Class: Discorb::NewsChannel
- Inherits:
-
TextChannel
- Object
- DiscordModel
- Channel
- GuildChannel
- TextChannel
- Discorb::NewsChannel
- Defined in:
- lib/discorb/channel/text.rb
Overview
Represents a news channel (announcement channel).
Instance Attribute Summary
Attributes inherited from TextChannel
#default_auto_archive_duration, #last_message_id, #last_pin_timestamp, #nsfw, #rate_limit_per_user, #threads, #topic
Attributes inherited from GuildChannel
#permission_overwrites, #position
Attributes inherited from Channel
Instance Method Summary collapse
-
#follow_to(target, reason: nil) -> Async::Task<void>
Follow the existing announcement channel from self.
Methods inherited from TextChannel
#create_webhook, #delete_messages, #edit, #fetch_archived_private_threads, #fetch_archived_public_threads, #fetch_joined_archived_private_threads, #fetch_webhooks, #follow_from, #start_thread
Methods included from Messageable
#delete_message, #edit_message, #fetch_message, #fetch_messages, #fetch_pins, #pin_message, #post, #typing, #unpin_message
Methods inherited from GuildChannel
#<=>, #==, #create_invite, #delete, #delete_permissions, #fetch_invites, #guild, #inspect, #mention, #move, #parent, #set_permissions, #to_s
Methods inherited from Channel
Methods inherited from DiscordModel
Instance Method Details
#follow_to(target, reason: nil) -> Async::Task<void>
Follow the existing announcement channel from self.
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/discorb/channel/text.rb', line 413 def follow_to(target, reason: nil) Async do @client .http .request( Route.new( "/channels/#{@id}/followers", "//channels/:channel_id/followers", :post ), { webhook_channel_id: target.id }, audit_log_reason: reason ) .wait end end |