Create a new Channel Method handler
Usually SnowTransfer creates a method handler for you, this is here for completion
You can access the methods listed via client.channel.method
, where client
is an initialized SnowTransfer instance
request handler that calls the rest api
Disable [at]everyone/[at]here on outgoing messages
Pin a message within a channel
Id of the channel
Id of the message
Reason for pinning the message
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | if channel is not a DM channel |
READ_MESSAGE_HISTORY | if channel is not a DM channel |
MANAGE_MESSAGES | if channel is not a DM channel |
Add a user to a thread
Id of the channel
Id of the user to add
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
CurrentUser added to Thread | always |
SEND_MESSAGES_IN_THREADS | always |
Bulk delete messages, messages may not be older than 2 weeks
Id of the channel
array of message ids to delete
Reason for deleting the messages
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
MANAGE_MESSAGES | always |
Create an invite for a channel
If no data argument is passed, the invite will be created with the defaults listed below
Id of the channel
invite data (optional)
(https://discord.com/developers/docs/resources/invite#invite-object) (with metadata)
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
CREATE_INSTANT_INVITE | always |
Creates a new Message within a channel
Make sure to use a filename with a proper extension (e.g. png, jpeg, etc.) when you want to upload files
Id of the Channel to sent a message to
Data to send, if data is a string it will be used as the content of the message, if data is not a string you should take a look at the properties below to know what you may send
(https://discord.com/developers/docs/resources/channel#message-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
SEND_MESSAGES | if the message was sent by the current user and not in a thread channel |
SEND_MESSAGES_IN_THREADS | if the message was sent by the current user and is in a thread channel |
Adds a reaction to a message
Id of the channel
Id of the message
uri encoded reaction emoji to add
you may either use a discord emoji in the format :emoji_name:emoji_id
or a unicode emoji,
which can be found here
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
READ_MESSAGE_HISTORY | always |
ADD_REACTIONS | When no other user has reacted with the emoji used |
Creates a public thread off a message in a channel
Id of the channel
Id of the message
Thread meta data
(https://discord.com/developers/docs/resources/channel#channel-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
CREATE_PUBLIC_THREADS | always |
Creates a thread under a channel without a message
Id of the channel
Thread meta data
(https://discord.com/developers/docs/resources/channel#channel-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
CREATE_PUBLIC_THREADS | if creating a public thread |
CREATE_PRIVATE_THREADS | if creating a private thread |
Crosspost a message in a news channel to all following channels
Id of the news channel
Id of the message
(https://discord.com/developers/docs/resources/channel#message-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
SEND_MESSAGES | if the message was sent by the current user and not in a thread channel |
SEND_MESSAGES_IN_THREADS | if the message was sent by the current user and is in a thread channel |
MANAGE_MESSAGES | if the message wasn't sent by the current user |
Delete all reactions from a message
Id of the channel
Id of the message
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
READ_MESSAGE_HISTORY | always |
MANAGE_MESSAGES | always |
Delete a channel or thread via Id
This either deletes a Guild Channel or closes a Direct Message Channel
Be careful with deleting Guild Channels as this can not be undone!
When deleting a category, this does not delete the child channels of a category. They will just have their parent_id
removed.
Id of the channel
Reason for deleting the channel
(https://discord.com/developers/docs/resources/channel#channel-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
MANAGE_CHANNELS | When deleting a Guild Channel |
MANAGE_THREADS | When channelId is a Thread's Id |
Delete a permission overwrite from a channel
Id of the channel
Id of the permission overwrite
Reason for deleting the permission
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_CHANNELS | if channel is not a thread |
MANAGE_THREADS | if channel is a thread |
MANAGE_ROLES | always |
VIEW_CHANNEL | always |
Delete a message
Id of the channel
Id of the message
Reason for deleting the message
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
MANAGE_MESSAGES | When the bot isn't the author of the message |
Delete a reaction from a message
Id of the channel
Id of the message
reaction emoji
Id of the user
Resolves the Promise on successful execution
Permission | Condition |
---|---|
MANAGE_MESSAGES | always |
VIEW_CHANNEL | always |
READ_MESSAGE_HISTORY | always |
Delete a reaction added by the current user from a message
Id of the channel
Id of the message
reaction emoji
Resolves the Promise on successful execution
Permission | Condition |
---|---|
VIEW_CHANNEL | always |
READ_MESSAGE_HISTORY | always |
Modify the permission overwrites of a channel
Id of the channel
Id of the permission overwrite
modified permission overwrite object
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_CHANNELS | if channel is not a thread |
MANAGE_THREADS | if channel is a thread |
MANAGE_ROLES | always |
VIEW_CHANNEL | always |
Edit a message sent by the current user or edit the message flags of another user's message
Id of the channel
Id of the message
Data to send
(https://discord.com/developers/docs/resources/channel#message-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
MANAGE_MESSAGES | When editing someone else's message to set flags |
Get a channel via Id
Id of the channel
(https://discord.com/developers/docs/resources/channel#channel-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
Gets all threads that are private and archived within a GuildChannel
Id of the Channel
Array of channel objects with message_count, member_count, thread_metadata and optional member fields
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
CurrentUser added to Thread | if CurrentUser doesn't have MANAGE_THREADS |
MANAGE_THREADS | if CurrentUser isn't added to Thread |
Gets all threads that are private and archived within a GuildChannel that the CurrentUser is apart of
Id of the Channel
Array of channel objects with message_count, member_count, thread_metadata and optional member fields
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
CurrentUser added to Thread | if CurrentUser doesn't have MANAGE_THREADS |
MANAGE_THREADS | if CurrentUser isn't added to Thread |
Gets all threads that are public and archived within a GuildChannel
Id of the Channel
Array of channel objects with message_count, member_count, thread_metadata and optional member fields
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
CurrentUser added to Thread | if CurrentUser doesn't have MANAGE_THREADS |
MANAGE_THREADS | if CurrentUser isn't added to Thread |
Get a list of invites for a channel
Id of the channel
Array of invite objects (with metadata)
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
MANAGE_CHANNELS | always |
Get a single message via Id
Id of the channel
Id of the message
(https://discord.com/developers/docs/resources/channel#message-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
READ_MESSAGE_HISTORY | always |
Get a list of messages from a channel
Id of the channel
Array of discord message objects
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
READ_MESSAGE_HISTORY | always |
Get a list of pinned messages for a channel
Id of the channel
Array of message objects
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | if channel is not a DM channel |
READ_MESSAGE_HISTORY | if channel is not a DM channel |
Gets all members within a thread
Id of the Thread
Array of thread member objects
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
GUILD_MEMBERS gateway intent | always |
Get a list of users that reacted with a certain emoji on a certain message
Id of the channel
Id of the message
reaction emoji
Array of user objects
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
READ_MESSAGE_HISTORY | always |
Join a thread
Id of the channel
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
Leave a thread
Id of the channel
Resolves the Promise on successful execution
Remove a pinned message from a channel
Id of the channel
Id of the message
Reason for removing the pinned message
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | if channel is not a DM channel |
READ_MESSAGE_HISTORY | if channel is not a DM channel |
MANAGE_MESSAGES | if channel is not a DM channel |
Remove a user from a thread
Id of the channel
Id of the user to remove
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_THREADS | if the current user is not the creator of the thread |
Send an indicator that the current user is typing within a channel.
You should generally avoid this method unless used for longer computations (>1s)
Id of the channel
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
SEND_MESSAGES | if channel is not a thread |
SEND_MESSAGES_IN_THREADS | if channel is a thread |
Update a channel or thread
Id of the channel
Data to send
(https://discord.com/developers/docs/resources/channel#channel-object) object
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | always |
MANAGE_CHANNELS | always |
MANAGE_THREADS | When editing a Thread to change the name, archived, auto_archive_duration, rate_limit_per_user or locked fields |
Generated using TypeDoc
Methods for interacting with Channels and Messages