Create a new Guild Method Handler
Usually SnowTransfer creates a method handler for you, this is here for completion
You can access the methods listed via client.guild.method
, where client
is an initialized SnowTransfer instance
request handler that calls the rest api
Add a guild member to a guild via oauth2 access token
You need the oauth2 guilds.join
scope granted to the access_token
Your bot has to be a member of the guild you want to add the user to
Id of the guild
Id of the guild member
object containing the needed request data
(https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure)
Permissions needed | Condition |
---|---|
CREATE_INSTANT_INVITE | always |
OAUTH2 Scopes |
---|
guilds.join |
Add a role to a guild member
Id of the guild
Id of the guild member
Id of the role
object with reason property
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_ROLES | always |
Create a new Guild, limited to 10 guilds (you may create more if you are whitelisted) Check the discord docs for more infos
data
Ban a guild member
Id of the guild
Id of the guild member
object with a reason and a delete-message-days property
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
BAN_MEMBERS | always |
Create a channel within a guild
Id of the guild
channel properties
(https://discord.com/developers/docs/resources/channel#channel-object-channel-structure)
Permissions needed | Condition |
---|---|
MANAGE_CHANNELS | always |
ADMINISTRATOR | setting MANAGE_ROLES in permission_overwrites |
Attach a integration object from the user to the guild
Id of the guild
Integration object with id and type properties
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Create a new Role
Id of the guild
data with role properties
(https://discord.com/developers/docs/resources/channel#channel-object-channel-structure)
Permissions needed | Condition |
---|---|
MANAGE_ROLES | always |
Id of the guild
Id of the guild member
object with a reason and a communication_disabled_until property
Resolves the Promise on successful execution
Permissions deeded | Condition |
---|---|
MODERATE_MEMBERS | always |
Delete a guild
Your bot has to be the owner of the guild to do this
This action is irreversible, so use it with caution!
Id of the guild
Resolves the Promise on successful execution
Update a guild welcome screen object
Id of guild
Welcome screen data
(https://discord.com/developers/docs/resources/guild#welcome-screen-object)
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Get a guild via Id
Your bot has to be a member of the guild for this function to work
Id of the guild
Get a specific ban of a guild member
Id of the guild
Id of the member
(https://discord.com/developers/docs/resources/guild#ban-object-ban-structure) object
Permissions needed | Condition |
---|---|
BAN_MEMBERS | always |
Get bans of a guild
Id of the guild
List of bans
Permissions needed | Condition |
---|---|
BAN_MEMBERS | always |
Get a list of channels for a guild
Id of the guild
list of channels
Get integrations for a guild
Id of the guild
List of integration objects
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Get a guild member via Id
Id of the guild
Id of the guild member
Get a list of guild members
Id of the guild
query data
list of guild members
Get the amount of members that would be pruned when a prune with the passed amount of days would be started
Id of the guild
Object with a days property
Object with a "pruned" key indicating the amount of members that would be pruned
Permissions needed | Condition |
---|---|
KICK_MEMBERS | always |
Get a list of roles for a guild
Id of the guild
array of roles
Permissions needed | Condition |
---|---|
MANAGE_ROLES | always |
Get a guild's vanity URL code
Id of the guild
partial invite object
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Get a list of voice regions for the guild, includes vip-regions unlike voice.getVoiceRegions
Id of the guild
List of voice regions
Get a guild's welcome screen object
Id of the guild
Gets a guild widget object
Id of the guild
Get a guild widget settings object
Id of the guild
(https://discord.com/developers/docs/resources/guild#guild-widget-object)
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Returns all active threads in the guild, including public and private threads. Threads are ordered by their id
, in descending order
Id of the guild
All active threads and members the current user has access to.
Remove a ban of a user
Id of the guild
Id of the guild member
object with a reason property
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
BAN_MEMBERS | always |
Delete a guild integratiom
Id of the guild
Id of the integration
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Remove a guild member (aka kick them)
Id of the guild
Id of the guild member
object with reason property
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
KICK_MEMBERS | always |
Remove a role from a guild member
Id of the guild
Id of the guild member
Id of the role
object with reason property
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_ROLES | always |
Delete a role from the guild
Id of the guild
Id of the role
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_ROLES | always |
Get a list of guild members that match a query
Id of the guild
query data
list of guild members
Start a prune
Id of the guild
Object with a days property
Object with a "pruned" key indicating the amount of members that were pruned
Permissions needed | Condition |
---|---|
KICK_MEMBERS | always |
Batch update the positions of channels
Id of the guild
Resolves the Promise on successful execution
Updates the current user's voice state in a stage channel
Id of the guild
Data of the voice state
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MUTE_MEMBERS | when trying to un-suppress yourself |
REQUEST_TO_SPEAK | when trying to request to speak |
Update a guild
Id of the guild
data
(https://discord.com/developers/docs/resources/guild#guild-object)
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Update behaviour and settings of an integration object
Id of the guild
Id of the integration
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Update properties of a guild member
Check the table below to make sure you have the right permissions for the types of updates
Make sure that your bot has CONNECT
and MOVE_MEMBERS
on the channel you want to move the member to
Id of the guild
Id of the guild member
Updated properties
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_NICKNAMES | Nick Updates |
MANAGE_ROLES | Role Updates |
MUTE_MEMBERS | Mute Updates |
DEAFEN_MEMBERS | Deaf Updates |
MOVE_MEMBERS | Voice Move |
Update a guild role
Id of the guild
Id of the role
updated properties of the role
(https://discord.com/developers/docs/topics/permissions#role-object)
Permissions needed | Condition |
---|---|
MANAGE_ROLES | always |
Modify the positions of a role or multiple roles
Id of the guild
Role data to update
array of roles
Permissions needed | Condition |
---|---|
MANAGE_ROLES | always |
Update a guild widget settings object
Id of the guild
basic data of widget settings
(https://discord.com/developers/docs/resources/guild#guild-widget-object)
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Update the nick of the current user
Id of the guild
object with a nick property
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
CHANGE_NICKNAME | always |
Updates a user's voice state in a stage channel
Id of the guild
Data of the voice state
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MUTE_MEMBERS | when trying to suppress/un-suppress |
Generated using TypeDoc
Methods for interacting with Guilds