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
CurrentUser must be a member of the guild
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 for the new guild
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 |
* | if setting * permission in overwrites where * is any permission |
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 |
Delete a guild
CurrentUser must be the owner of the guild
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
CurrentUser must be a member of the guild
Id of the guild
when true, will return approximate member and presence counts for the guild
Get a specific ban of a guild member
Id of the guild
Id of the member
Get bans of a guild
Id of the guild
Query string options
List of bans
Permissions needed | Condition |
---|---|
BAN_MEMBERS | always |
Get a list of all channels for a guild. Does not include threads
CurrentUser must be a member of the 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 invites for a guild
Id of the guild
List of invites (with metadata)
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Get a guild member via Id
CurrentUser must be a member of the guild
Id of the guild
Id of the guild member
Get a list of guild members
CurrentUser must be a member of the guild
Id of the guild
query data
list of guild members
Intents |
---|
GUILD_MEMBERS |
Gets a guild's preview. If the CurrentUser is not in the guild, the guild must be lurkable
Id of the guild
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 "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
(https://discord.com/developers/docs/resources/guild#welcome-screen-object)
Permissions needed | Condition |
---|---|
MANAGE_GUILD | if the welcome screen is not enabled |
Gets a guild widget object
Id of the guild
Get a guild widget settings object
Id of the guild
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 member objects of the CurrentUser that the CurrentUser has access to.
Remove a ban of a user
Id of the guild
Id of the guild member
Reason for removing the ban
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
BAN_MEMBERS | always |
Delete a guild integration
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
Reason for kicking the member
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
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
Reason for deleting 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 prune data
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. Only those being moved needs to be included here
Id of the guild
Positional data to send
Resolves the Promise on successful execution
Permissions needed | Condition |
---|---|
MANAGE_CHANNELS | always |
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
Updated guild data
(https://discord.com/developers/docs/resources/guild#guild-object)
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Update properties of a guild member
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 |
CONNECT | Voice Move |
MODERATE_MEMBERS | Timeouts |
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 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
widget settings
Updated Guild Widget settings
Permissions needed | Condition |
---|---|
MANAGE_GUILD | always |
Update the nick of the CurrentMember
Id of the guild
object with a nick property and optionally, a reason 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