ChannelRESTAPI¶
Inherits: DiscordRESTAPI < Reference < Object
Description¶
Channel REST API implementation.
Methods¶
return type | signature |
---|---|
Channel | get_channel ( int channel_id ) coroutine |
Channel | edit_channel ( int channel_id, Dictionary params, String reason="" ) coroutine |
Channel | delete_channel ( int channel_id, String reason="" ) coroutine |
Array | get_messages ( int channel_id, Dictionary query={limit=50} ) coroutine |
Message | get_message ( int channel_id, int message_id ) coroutine |
Message | create_message ( int channel_id, Dictionary params ) coroutine |
Message | crosspost_message ( int channel_id, int message_id ) coroutine |
bool | create_reaction ( int channel_id, int message_id, Emoji emoji ) coroutine |
bool | delete_own_reaction ( int channel_id, int message_id, Emoji emoji ) coroutine |
bool | delete_user_reaction ( int channel_id, int message_id, Emoji emoji, int user_id ) coroutine |
Array | get_reactions ( int channel_id, int message_id, Emoji emoji, int after=0, int limit=25 ) coroutine |
void | delete_all_reactions ( int channel_id, int message_id ) coroutine |
void | delete_emoji_reactions ( int channel_id, int message_id, Emoji emoji ) coroutine |
Message | edit_message ( int channel_id, int message_id, Dictionary params ) coroutine |
bool | delete_message ( int channel_id, int message_id, String reason="" ) coroutine |
bool | bulk_delete_messages ( int channel_id, PoolStringArray messages_ids, String reason="" ) coroutine |
bool | edit_channel_permissions ( int channel_id, int overwrite_id, Dictionary params, String reason ) coroutine |
Array | get_channel_invites ( int channel_id ) coroutine |
Guild.Invite | create_channel_invite ( int channel_id, Dictionary params, String reason="" ) coroutine |
bool | delete_channel_permission ( int channel_id, int overwrite_id, String reason ) coroutine |
Method Descriptions¶
-
ChannelRESTAPI ChannelRESTAPI ( String _token, DiscordRESTRequester _requester, BaseDiscordEntityManager _entity_manager )
Constructs a new
ChannelRESTAPI
object.
-
Channel get_channel ( int channel_id ) coroutine
Gets the channel with the given
channel_id
.
https://discord.com/developers/docs/resources/channel#get-channel
-
Channel edit_channel ( int channel_id, Dictionary params, String reason="" ) coroutine
Update a channel's settings.
https://discord.com/developers/docs/resources/channel#modify-channel
-
Channel delete_channel ( int channel_id, String reason="" ) coroutine
Deletes a channel, or closes a private message.
https://discord.com/developers/docs/resources/channel#get-channel
-
Array get_messages ( int channel_id, Dictionary query={limit=50} ) coroutine
Gets a list of messages in a channel.
https://discord.com/developers/docs/resources/channel#get-channel-messages
-
Message get_message ( int channel_id, int message_id ) coroutine
Gets a message in a channel.
https://discord.com/developers/docs/resources/channel#get-channel-message
-
Message create_message ( int channel_id, Dictionary params ) coroutine
Creates a message in a channel.
https://discord.com/developers/docs/resources/channel#create-message
-
Message crosspost_message ( int channel_id, int message_id ) coroutine
Cross-posts a message in a News Channel to following channels.
https://discord.com/developers/docs/resources/channel#crosspost-message
-
bool create_reaction ( int channel_id, int message_id, Emoji emoji ) coroutine
Creates a reaction for a message. Returns
true
on success.
https://discord.com/developers/docs/resources/channel#create-reaction
-
bool delete_own_reaction ( int channel_id, int message_id, Emoji emoji ) coroutine
Deletes a reaction the current user has made for the message.
Returnstrue
on success. https://discord.com/developers/docs/resources/channel#delete-own-reaction
-
bool delete_user_reaction ( int channel_id, int message_id, Emoji emoji, int user_id ) coroutine
Deletes another user's reaction. Returns
true
on success.
https://discord.com/developers/docs/resources/channel#delete-user-reaction
-
Array get_reactions ( int channel_id, int message_id, Emoji emoji, int after=0, int limit=25 ) coroutine
Gets a list of users that reacted with the given
emoji
.
https://discord.com/developers/docs/resources/channel#get-reactions
-
void delete_all_reactions ( int channel_id, int message_id ) coroutine
Deletes all reactions on a message.
https://discord.com/developers/docs/resources/channel#get-channel-message
-
void delete_emoji_reactions ( int channel_id, int message_id, Emoji emoji ) coroutine
Deletes all the reactions for a given
emoji
on a message.
https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
-
Message edit_message ( int channel_id, int message_id, Dictionary params ) coroutine
Edits a previously sent message.
https://discord.com/developers/docs/resources/channel#edit-message
-
bool delete_message ( int channel_id, int message_id, String reason="" ) coroutine
Deletes a message. Returns
true
on success.
https://discord.com/developers/docs/resources/channel#delete-message
-
bool bulk_delete_messages ( int channel_id, PoolStringArray messages_ids, String reason="" ) coroutine
Delete multiple messages in a single request. Returns
true
on success.
https://discord.com/developers/docs/resources/channel#bulk-delete-messages
-
bool edit_channel_permissions ( int channel_id, int overwrite_id, Dictionary params, String reason ) coroutine
Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Returns
true
on success.
https://discord.com/developers/docs/resources/channel#edit-channel-permissions
-
Array get_channel_invites ( int channel_id ) coroutine
Returns a list of
Guild.Invite
objects for the channel.
https://discord.com/developers/docs/resources/channel#get-channel-invites
-
Guild.Invite create_channel_invite ( int channel_id, Dictionary params, String reason="" ) coroutine
Create a new invite for the channel. Only usable for guild channels.
https://discord.com/developers/docs/resources/channel#create-channel-invite
-
bool delete_channel_permission ( int channel_id, int overwrite_id, String reason ) coroutine
Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Returns
true
on success.
https://discord.com/developers/docs/resources/channel#delete-channel-permissions