Class: RubyCord::Guild::NewsChannel
- Inherits:
-
TextChannel
- Object
- DiscordModel
- Channel
- Channel
- TextChannel
- RubyCord::Guild::NewsChannel
- Defined in:
- lib/rubycord/guild/channel/news.rb
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 Channel
#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 Internal::Messageable
#delete_message, #edit_message, #fetch_message, #fetch_messages, #fetch_pins, #pin_message, #post, #typing, #unpin_message
Methods inherited from Channel
#<=>, #==, #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.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rubycord/guild/channel/news.rb', line 20 def follow_to(target, reason: nil) Async do @client .http .request( RubyCord::Internal::Route.new( "/channels/#{@id}/followers", "//channels/:channel_id/followers", :post ), { webhook_channel_id: target.id }, audit_log_reason: reason ) .wait end end |