Methods
acceptInvite (invite_code:String, ?cb:Invite ‑> ErrorReport ‑> Void):Void
(NOT AVAILABLE FOR BOTS) Accept an invite code and join the server.
Parameters:
invite_code |
|
---|---|
cb |
|
addChannelPin (channel_id:String, message_id:String, ?cb:EmptyResponseCallback):Void
Add a channel pin
Parameters:
channel_id |
|
---|---|
message_id |
|
cb |
|
addGuildMember (guild_id:String, user_id:String, member_data:AddGuildMember, ?cb:GuildMember ‑> String ‑> Void):Void
Add a guild member using a token received through Oauth2.
Requires the CREATE_INSTANT_INVITE permission along with various other permissions depending on member_data
parameters
Parameters:
guild_id |
|
---|---|
user_id |
|
member_data |
|
cb |
|
addIntegration (guild_id:String, int_data:IntegrationCreate, ?cb:EmptyResponseCallback):Void
Add a new integration from the user onto the guild. Requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
int_data |
|
cb |
|
banMember (guild_id:String, user_id:String, days:Int = 7, reason:String = "", ?cb:EmptyResponseCallback):Void
Ban a member of the guild. Requires the BAN_MEMBERS permission.
Parameters:
guild_id |
|
---|---|
user_id |
|
days |
|
reason |
|
cb |
|
beginPrune (guild_id:String, days:Int = 1, ?cb:Int ‑> ErrorReport ‑> Void):Void
Prune the members of a server. Requires the KICK_MEMBERS permission
Parameters:
guild_id |
|
---|---|
days |
|
cb |
|
callEndpoint (method:String, endpoint:EndpointPath, ?callback:Dynamic ‑> ErrorReport ‑> Void, ?data:{}, authorized:Bool = true):Void
Call an endpoint while respecting ratelimits and such. Only use this if the endpoint call is not a function of its own (and make an issue on the github if that is the case)
Parameters:
method |
|
---|---|
endpoint |
|
callback |
|
data |
|
authorized |
|
changeNickname (guild_id:String, nickname:String, ?cb:String ‑> ErrorReport ‑> Void):Void
Change this user's nickname.
Parameters:
guild_id |
|
---|---|
nickname |
|
cb |
|
createChannel (guild_id:String, channel_data:ChannelCreate, ?cb:EmptyResponseCallback):Void
Create a channel in a guild
Parameters:
guild_id |
|
---|---|
channel_data |
|
cb |
|
createChannelInvite (channel_id:String, invite:InviteCreate, ?cb:EmptyResponseCallback):Void
Create a new invite for a given channel
Parameters:
channel_id |
|
---|---|
invite |
|
cb |
|
createDM (data:{recipient_id:String}, ?cb:DMChannel ‑> ErrorReport ‑> Void):Void
Create a dm with another individual
Parameters:
data |
|
---|---|
cb |
|
createEmoji (guild_id:String, emoji:EmojiCreate, ?cb:Emoji ‑> String ‑> Void):Void
Create an emoji in a guild.
Parameters:
guild_id |
|
---|---|
emoji |
|
cb |
|
createGroupDM (data:CreateGroupDM, ?cb:DMChannel ‑> ErrorReport ‑> Void):Void
Create a DM group.
Parameters:
data |
|
---|---|
cb |
|
createGuild (guild_data:GuildCreate, ?cb:Guild ‑> ErrorReport ‑> Void):Void
Create a new guild based on the data given
Parameters:
guild_data |
|
---|---|
cb |
|
createReaction (channel_id:String, message_id:String, emoji:String, ?cb:EmptyResponseCallback):Void
Add a reaction to a message. requires READ_MESSAGE_HISTORY and ADD_REACTIONS if the emoji is not already present.
Parameters:
channel_id |
|
---|---|
message_id |
|
emoji |
|
cb |
|
createRole (guild_id:String, role_data:RoleInfo, ?cb:Role ‑> ErrorReport ‑> Void):Void
Create a role. Requires the MANAGE_ROLES permission.
Parameters:
guild_id |
|
---|---|
role_data |
|
cb |
|
createWebhook (channel_id:String, data:{name:String, avatar:String}, ?cb:Webhook ‑> ErrorReport ‑> Void):Void
Create a webhook for a given channel based on the given data.
Parameters:
channel_id |
|
---|---|
data |
|
cb |
|
deleteAllReactions (channel_id:String, message_id:String, ?cb:EmptyResponseCallback):Void
Delete all reactions from a message. Requires the MANAGE_MESSAGES permission.
Parameters:
channel_id |
|
---|---|
message_id |
|
cb |
|
deleteChannel (channel_id:String, ?cb:Channel ‑> ErrorReport ‑> Void):Void
Delete the given channel.
Parameters:
channel_id |
|
---|---|
cb |
|
deleteChannelPermission (channel_id:String, overwrite_id:String, ?cb:EmptyResponseCallback):Void
Delete a channel override
Parameters:
channel_id |
|
---|---|
overwrite_id |
|
cb |
|
deleteChannelPin (channel_id:String, message_id:String, ?cb:EmptyResponseCallback):Void
Delete a channel's pin
Parameters:
channel_id |
|
---|---|
message_id |
|
cb |
|
deleteGuild (guild_id:String, ?cb:EmptyResponseCallback):Void
Delete a guild. The account must be the owner of the guild.
Parameters:
guild_id |
|
---|---|
cb |
|
deleteIntegration (guild_id:String, int_id:String, ?cb:EmptyResponseCallback):Void
Remove an integration from a guild. Requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
int_id |
|
cb |
|
deleteInvite (invite_code:String, ?cb:Invite ‑> ErrorReport ‑> Void):Void
Delete an invite based on it's invite code. Requires the MANAGE_CHANNELS permission in the guild the invite is from.
Parameters:
invite_code |
|
---|---|
cb |
|
deleteMessage (channel_id:String, message_id:String, ?cb:EmptyResponseCallback):Void
Delete a given message. If the author is not the current user, the MANAGE_MESSAGES permission is required
Parameters:
channel_id |
|
---|---|
message_id |
|
cb |
|
deleteMessages (channel_id:String, message_ids:MessageBulkDelete, ?cb:EmptyResponseCallback):Void
Delete a given messages. MANAGE_MESSAGES is required.
Parameters:
channel_id |
|
---|---|
message_ids |
|
cb |
|
deleteOwnReaction (channel_id:String, message_id:String, emoji:String, ?cb:EmptyResponseCallback):Void
Delete a reaction of your own off of a message.
Parameters:
channel_id |
|
---|---|
message_id |
|
emoji |
|
cb |
|
deleteRole (guild_id:String, role_id:String, ?cb:EmptyResponseCallback):Void
Delete a role from a guild. Requires the MANAGE_ROLES permission.
Parameters:
guild_id |
|
---|---|
role_id |
|
cb |
|
deleteUserReaction (channel_id:String, message_id:String, user_id:String, emoji:String, ?cb:EmptyResponseCallback):Void
Delete another user's reaction off of a message.
Parameters:
channel_id |
|
---|---|
message_id |
|
user_id |
|
emoji |
|
cb |
|
deleteWebhook (webhook_id:String, ?cb:EmptyResponseCallback):Void
Delete a webhook based on it's id. Requires the MANAGE_WEBHOOKS permission in the guild/channel that the webhook is part of.
Parameters:
webhook_id |
|
---|---|
cb |
|
deleteWebhookWithToken (webhook_id:String, webhook_token:String, ?cb:EmptyResponseCallback):Void
Delete a webhook based on it's id and token.
Parameters:
webhook_id |
|
---|---|
webhook_token |
|
cb |
|
editChannelPermissions (channel_id:String, overwrite_id:String, new_permission:Overwrite, ?cb:EmptyResponseCallback):Void
Edit or Create a channel's overwrite permissions;
Parameters:
channel_id |
|
---|---|
overwrite_id |
|
new_permission |
|
cb |
|
editGuildMember (guild_id:String, user_id:String, member_data:EditGuildMember, ?cb:EmptyResponseCallback):Void
Edit a guild member's properties, requires various permissions depending on the data provided.
Parameters:
guild_id |
|
---|---|
user_id |
|
member_data |
|
cb |
|
editIntegration (guild_id:String, int_id:String, int_data:IntegrationModify, ?cb:EmptyResponseCallback):Void
Edit an integration in a guild. Requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
int_id |
|
int_data |
|
cb |
|
editMessage (channel_id:String, message_id:String, message:MessageEdit, ?cb:Message ‑> ErrorReport ‑> Void):Void
Edit a message previously sent by you.
Parameters:
channel_id |
|
---|---|
message_id |
|
message |
|
cb |
|
editRole (guild_id:String, role_id:String, role_data:RoleInfo, ?cb:Role ‑> ErrorReport ‑> Void):Void
Edit a role's data. Requires the MANAGE_ROLES permission.
Parameters:
guild_id |
|
---|---|
role_id |
|
role_data |
|
cb |
|
editUser (user_data:{username:String, avatar:String}, ?cb:User ‑> ErrorReport ‑> Void):Void
Edit the current user's settings.
Parameters:
user_data |
|
---|---|
cb |
|
editWebhook (webhook_id:String, data:{name:Null<String>, avatar:Null<String>}, ?cb:Webhook ‑> ErrorReport ‑> Void):Void
Edit a webhook based on it's id. Requires the MANAGE_WEBHOOKS permission in the guild/channel that the webhook is part of.
Parameters:
webhook_id |
|
---|---|
data |
|
cb |
|
editWebhookWithToken (webhook_id:String, webhook_token:String, data:{name:Null<String>, avatar:Null<String>}, ?cb:Webhook ‑> ErrorReport ‑> Void):Void
Edit a webhook using it's id and token
Parameters:
webhook_id |
|
---|---|
webhook_token |
|
data |
|
cb |
|
executeWebhook (webhook_id:String, webhook_token:String, data:WebhookMessage, wait:Bool = false, ?cb:EmptyResponseCallback):Void
Execute a given webhook and send a message.
Parameters:
webhook_id |
|
---|---|
webhook_token |
|
data |
|
wait |
|
cb |
|
getAuditLogs (guild_id:String, ?filter:AuditLogFilter, ?cb:AuditLog ‑> ErrorReport ‑> Void):Void
Get a guild's audit logs
Parameters:
guild_id |
|
---|---|
filter |
|
cb |
|
getChannel (channel_id:String, ?cb:Channel ‑> ErrorReport ‑> Void):Void
Get a channel based on a given channel id.
Parameters:
channel_id |
|
---|---|
cb |
|
getChannelInvites (channel_id:String, ?cb:Array<Invite> ‑> ErrorReport ‑> Void):Void
Get the invites of a given channel
Parameters:
channel_id |
|
---|---|
cb |
|
getChannelPins (channel_id:String, ?cb:Array<Message> ‑> ErrorReport ‑> Void):Void
Get the pins of a channel
Parameters:
channel_id |
|
---|---|
cb |
|
getChannelWebhooks (channel_id:String, ?cb:Array<Webhook> ‑> ErrorReport ‑> Void):Void
Get all webhooks for a given channel. Requires the MANAGE_WEBHOOKS permission.
Parameters:
channel_id |
|
---|---|
cb |
|
getChannels (guild_id:String, ?cb:Array<Channel> ‑> ErrorReport ‑> Void):Void
Get the channels in a guild
Parameters:
guild_id |
|
---|---|
cb |
|
getConnections (?cb:Array<Connection> ‑> ErrorReport ‑> Void):Void
Get a list of connections hooked up to the current account.
Parameters:
cb |
|
---|
getDMChannels (?cb:Array<DMChannel> ‑> ErrorReport ‑> Void):Void
Get the dm channels that the current user has open.
Parameters:
cb |
|
---|
getEmoji (guild_id:String, emoji_id:String, ?cb:Emoji ‑> String ‑> Void):Void
Get an emojis from a guild by id of guild and emoji.
Parameters:
guild_id |
|
---|---|
emoji_id |
|
cb |
|
getGateway (bot:Bool = false, ?cb:Gateway ‑> ErrorReport ‑> Void):Void
Get the gateway that the client should connect to.
Parameters:
bot |
|
---|---|
cb |
|
getGuild (guild_id:String, ?cb:Guild ‑> String ‑> Void):Void
Get a guild by the id.
Parameters:
guild_id |
|
---|---|
cb |
|
getGuildBans (guild_id:String, ?cb:Array<User> ‑> ErrorReport ‑> Void):Void
List all the bans in a guild. Requires the BAN_MEMBERS permission.
Parameters:
guild_id |
|
---|---|
cb |
|
getGuildMember (guild_id:String, user_id:String, ?cb:GuildMember ‑> ErrorReport ‑> Void):Void
Get a member of the guild.
Parameters:
guild_id |
|
---|---|
user_id |
|
cb |
|
getGuildMembers (guild_id:String, format:ListGuildMember, ?cb:Array<GuildMember> ‑> String ‑> Void):Void
Get all members of a guild.
Parameters:
guild_id |
|
---|---|
format |
|
cb |
|
getGuildRoles (guild_id:String, ?cb:Array<Role> ‑> ErrorReport ‑> Void):Void
Get the roles of a guild. Requires the MANAGE_ROLES permission.
Parameters:
guild_id |
|
---|---|
cb |
|
getGuildWebhooks (guild_id:String, ?cb:Array<Webhook> ‑> ErrorReport ‑> Void):Void
Get all webhooks for a given guild. Requires the MANAGE_WEBHOOKS permission.
Parameters:
guild_id |
|
---|---|
cb |
|
getGuilds (filter:GetGuildFilter, ?cb:Array<Guild> ‑> ErrorReport ‑> Void):Void
Get a list of all guilds that the current user is in. Normal users do not need to use the filter and can leave it blank {}
Parameters:
filter |
|
---|---|
cb |
|
getIntegrations (guild_id:String, ?cb:Array<GuildIntegration> ‑> ErrorReport ‑> Void):Void
Get a list of integrations for a given guild. Requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
cb |
|
getInvite (invite_code:String, with_counts:Bool = true, ?cb:Invite ‑> ErrorReport ‑> Void):Void
Get information about an invite code.
Parameters:
invite_code |
|
---|---|
with_counts |
|
cb |
|
getInvites (guild_id:String, ?cb:Array<Invite> ‑> ErrorReport ‑> Void):Void
Get a list of all invites in a guild. requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
cb |
|
getMessage (channel_id:String, message_id:String, ?cb:Message ‑> ErrorReport ‑> Void):Void
Get a message in a channel
Parameters:
channel_id |
|
---|---|
message_id |
|
cb |
|
getMessages (channel_id:String, format:MessagesRequest, ?cb:Array<Message> ‑> ErrorReport ‑> Void):Void
Get messages from a given channel according to the given format.
Parameters:
channel_id |
|
---|---|
format |
|
cb |
|
getPruneCount (guild_id:String, days:Int = 1, ?cb:Int ‑> ErrorReport ‑> Void):Void
Get the number of users that will be pruned if a prune was run. Requires the KICK_MEMBERS permission.
Parameters:
guild_id |
|
---|---|
days |
|
cb |
|
getReactions (channel_id:String, message_id:String, emoji:String, ?cb:Array<Reaction> ‑> String ‑> Void):Void
Get all reactions of emoji by user on a message.
Parameters:
channel_id |
|
---|---|
message_id |
|
emoji |
|
cb |
|
getUser (user_id:String = "@me", ?cb:User ‑> ErrorReport ‑> Void):Void
Get a user based on their Id. @me" to return self.
Parameters:
user_id |
|
---|---|
cb |
|
getWebhook (webhook_id:String, ?cb:Webhook ‑> ErrorReport ‑> Void):Void
Get a webhook based on it's id. Requires the MANAGE_WEBHOOKS permission in the guild/channel that the webhook is part of.
Parameters:
webhook_id |
|
---|---|
cb |
|
getWebhookWithToken (webhook_id:String, webhook_token:String, ?cb:Webhook ‑> ErrorReport ‑> Void):Void
Get a webhook using it's id and token.
Parameters:
webhook_id |
|
---|---|
webhook_token |
|
cb |
|
getWidget (guild_id:String, ?cb:GuildEmbed ‑> ErrorReport ‑> Void):Void
Get the widget/embed for a guild. Requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
cb |
|
giveMemberRole (guild_id:String, user_id:String, role_id:String, ?cb:EmptyResponseCallback):Void
Give a role to a member. Requires the MANAGE_ROLES permission
Parameters:
guild_id |
|
---|---|
user_id |
|
role_id |
|
cb |
|
groupDMAddRecipient (channel_id:String, user_id:String, access_token:String, nick:String, ?cb:EmptyResponseCallback):Void
Add a user to a group dm.
Parameters:
channel_id |
|
---|---|
user_id |
|
access_token |
|
nick |
|
cb |
|
groupDMRemoveRecipient (channel_id:String, user_id:String, ?cb:EmptyResponseCallback):Void
Remove a user from a group dm.
Parameters:
channel_id |
|
---|---|
user_id |
|
cb |
|
guildVoiceRegions (guild_id:String, ?cb:Array<VoiceRegion> ‑> ErrorReport ‑> Void):Void
Get a list of voice regions for the guild. Including VIP servers if the server is a VIP-Enabled server.
Parameters:
guild_id |
|
---|---|
cb |
|
kickMember (guild_id:String, user_id:String, reason:String = "", ?cb:EmptyResponseCallback):Void
Kick a member from the guild. Requires the KICK_MEMBERS permission
Parameters:
guild_id |
|
---|---|
user_id |
|
reason |
|
cb |
|
leaveGuild (guild_id:String, ?cb:EmptyResponseCallback):Void
Make the current user leave the specified guild.
Parameters:
guild_id |
|
---|---|
cb |
|
listEmojis (guild_id:String, ?cb:Array<Emoji> ‑> String ‑> Void):Void
Get all emojis on a guild by guild_id.
Parameters:
guild_id |
|
---|---|
cb |
|
listVoiceRegions (?cb:Array<VoiceRegion> ‑> ErrorReport ‑> Void):Void
Get a list of voice regions.
Parameters:
cb |
|
---|
modifyChannel (channel_id:String, channel_data:ChannelUpdate, ?cb:Channel ‑> ErrorReport ‑> Void):Void
Change a channel's parameters
Parameters:
channel_id |
|
---|---|
channel_data |
|
cb |
|
modifyEmoji (guild_id:String, emoji_id:String, emoji:EmojiModify, ?cb:Emoji ‑> String ‑> Void):Void
Modify an emoji in a guild.
Parameters:
guild_id |
|
---|---|
emoji_id |
|
emoji |
|
cb |
|
modifyGuild (guild_id:String, guild_data:GuildUpdate, ?cb:Guild ‑> ErrorReport ‑> Void):Void
Edit a guild's settings. Requires the MANAGE_GUILD permission
Parameters:
guild_id |
|
---|---|
guild_data |
|
cb |
|
modifyWidget (guild_id:String, edits:GuildEmbed, ?cb:GuildEmbed ‑> ErrorReport ‑> Void):Void
Change the properties of a guild's embed or widget. Requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
edits |
|
cb |
|
moveChannel (guild_id:String, changes:PositionChange, ?cb:Array<Channel> ‑> String ‑> Void):Void
Move two or more channel's positions within a guild. Requires the MANAGE_CHANNELS permission.
Parameters:
guild_id |
|
---|---|
changes |
|
cb |
|
moveRole (guild_id:String, changes:PositionChange, ?cb:Array<Role> ‑> ErrorReport ‑> Void):Void
Move the position of two or more roles in the hierarchy, requiers the MANAGE_ROLES permission.
Parameters:
guild_id |
|
---|---|
changes |
|
cb |
|
rawCallEndpoint (method:String, endpoint:String, ?callback:Dynamic ‑> Map<String, String> ‑> Void, ?data:{}, authorized:Bool = true):Void
Call an endpoint directly, no ratelimits no nothin.
Parameters:
method |
|
---|---|
endpoint |
|
callback |
|
data |
|
authorized |
|
removeEmoji (guild_id:String, emoji_id:String, ?cb:EmptyResponseCallback):Void
Remove an emoji by ID in a guild
Parameters:
guild_id |
|
---|---|
emoji_id |
|
cb |
|
sendMessage (channel_id:String, message:MessageCreate, ?cb:Message ‑> ErrorReport ‑> Void):Void
Send a message to a channel
Parameters:
channel_id |
|
---|---|
message |
|
cb |
|
startTyping (channel_id:String, ?cb:EmptyResponseCallback):Void
Send a typing event in the given channel. This lasts for 10 seconds or when a message is sent, whichever comes first.
Parameters:
channel_id |
|
---|---|
cb |
|
syncIntegration (guild_id:String, int_id:String, ?cb:EmptyResponseCallback):Void
Sync a given integration in a guild. Requires the MANAGE_GUILD permission.
Parameters:
guild_id |
|
---|---|
int_id |
|
cb |
|
takeMemberRole (guild_id:String, user_id:String, role_id:String, ?cb:EmptyResponseCallback):Void
Take a role away from a member. Requires the MANAGE_ROLES permission
Parameters:
guild_id |
|
---|---|
user_id |
|
role_id |
|
cb |
|
unbanMember (guild_id:String, user_id:String, reason:String = "", ?cb:EmptyResponseCallback):Void
Unban a member of the guild. Requires the BAN_MEMBERS permission.
Parameters:
guild_id |
|
---|---|
user_id |
|
cb |
|