Types
Overwrite* = object id*: string `type`*: string allow*: int deny*: int
- Source Edit
DChannel* = object of RootObj id*: string guild_id*: string name*: string `type`*: int position*: int is_private*: bool permission_overwrites*: seq[Overwrite] topic*: string last_message_id*: string last_pin_timestamp*: string bitrate*: int user_limit*: int recipients*: seq[User]
- Source Edit
Message* = object of RootObj `type`: int tts*: bool timestamp*: string pinned*: bool nonce*: string mention_roles*: seq[Role] mentions*: seq[User] mention_everyone*: bool id*: string embeds*: seq[Embed] edited_timestamp*: string content*: string channel_id*: string author*: User attachments*: seq[Attachment] reactions*: seq[Reaction] webhook_id*: string
- Source Edit
Reaction* = object count*: int me*: bool emoji*: Emoji
- Source Edit
Emoji* = object id*: string name*: string roles*: seq[Role] require_colons*: bool managed*: bool
- Source Edit
Embed* = object title*: string `type`*: string description*: string url*: string timestamp*: string color*: int footer*: EmbedFooter image*: EmbedImage thumbnail*: EmbedThumbnail video*: EmbedVideo provider*: EmbedProvider author*: EmbedAuthor fields*: seq[EmbedField]
- Source Edit
EmbedThumbnail* = object url*: string proxy_url*: string height*: int width*: int
- Source Edit
EmbedVideo* = object url*: string height*: int width*: int
- Source Edit
EmbedImage* = object url*: string proxy_url*: string height*: int width*: int
- Source Edit
EmbedProvider* = object name*: string url*: string
- Source Edit
EmbedAuthor* = object name*: string url*: string icon_url*: string proxy_icon_url*: string
- Source Edit
- Source Edit
EmbedField* = object name*: string value*: string inline*: bool
- Source Edit
Attachment* = object id*: string filename*: string size*: int url*: string proxy_url*: string height*: int width*: int
- Source Edit
Presence* = object user: User roles: seq[string] game: Game guild_id: string status: string
- Source Edit
Guild* = object of RootObj id*: string name*: string icon*: string splash*: string owner_id*: string region*: string afk_channel_id*: string afk_timeout*: int embed_enabled*: bool embed_channel_id*: string verification_level*: int default_message_notifications*: int roles*: seq[Role] emojis*: seq[Emoji] mfa_level*: int joined_at*: string large*: bool unavailable*: bool features: seq[JsonNode] explicit_content_filter*: int member_count*: int voice_states*: seq[VoiceState] members*: seq[GuildMember] channels*: seq[DChannel] presences*: seq[Presence] application_id*: string widget_channel_id*: string widget_enabled*: bool
- Source Edit
GuildMember* = object of RootObj guild_id*: string user*: User nick*: string roles*: seq[string] joined_at*: string deaf*: bool mute*: bool
- Source Edit
Integration* = object id*: string name*: string `type`*: string enabled*: bool syncing*: bool role_id*: string expire_behavior*: int expire_grace_period*: int user*: User account*: Account synced_at*: string
- Source Edit
Account* = object id*: string name*: string
- Source Edit
Invite* = object code*: string guild*: InviteGuild channel*: InviteChannel
- Source Edit
InviteMetadata* = object inviter*: User uses*: int max_uses*: int max_age*: int temporary*: bool created_at*: string revoked*: bool
- Source Edit
InviteGuild* = object id*: string name*: string splash*: string icon*: string
- Source Edit
InviteChannel* = object id*: string name*: string `type`*: string
- Source Edit
User* = object of RootObj id*: string username*: string discriminator*: string avatar*: string bot*: bool mfa_enabled*: bool verified*: bool email*: string
- Source Edit
UserGuild* = object id: string name: string icon: string owner: bool permissions: int
- Source Edit
Connection* = object id*: string name*: string `type`*: string revoked*: bool integrations*: seq[Integration]
- Source Edit
VoiceState* = object of RootObj guild_id*: string channel_id*: string user_id*: string session_id*: string deaf*: bool mute*: bool self_deaf*: bool self_mute*: bool suppress*: bool
- Source Edit
VoiceRegion* = object id*: string name*: string sample_hostname*: string sample_port*: int vip*: bool optimal*: bool deprecated*: bool custom*: bool
- Source Edit
Webhook* = object id*: string guild_id*: string channel_id*: string user*: User name*: string avatar*: string token*: string
- Source Edit
Role* = object id*: string name*: string color*: int hoist*: bool position*: int permissions*: int managed*: bool mentionable*: bool
- Source Edit
ChannelParams* = ref object name*: string position*: int topic*: string bitrate*: int user_limit*: int
- Source Edit
GuildParams* = ref object name*: string region*: string verification_level*: int default_message_notifications*: int afk_channel_id*: string afk_timeout*: int icon*: string owner_id*: string splash*: string
- Source Edit
GuildMemberParams* = ref object nick*: string roles*: seq[string] mute*: bool deaf*: bool channel_id*: string
- Source Edit
GuildEmbed* = object enabled*: bool channel_id*: string
- Source Edit
WebhookParams* = ref object content*: string username*: string avatar_url*: string tts*: bool embeds*: seq[Embed]
- Source Edit
GuildDelete* = object id*: string unavailable*: bool
- Source Edit
GuildEmojisUpdate* = object guild_id*: string emojis*: seq[Emoji]
- Source Edit
GuildIntegrationsUpdate* = object guild_id*: string
- Source Edit
GuildRoleCreate* = object guild_id*: string role*: Role
- Source Edit
GuildRoleUpdate* = object guild_id*: string role*: Role
- Source Edit
GuildRoleDelete* = object guild_id*: string role_id*: string
- Source Edit
MessageDeleteBulk* = object ids*: seq[string] channel_id*: string
- Source Edit
Game* = object of RootObj name*: string `type`*: int url*: string
- Source Edit
PresenceUpdate* = object user*: User nick: string roles*: seq[string] game*: Game guild_id*: string status*: string
- Source Edit
TypingStart* = object channel_id*: string user_id*: string timestamp*: int
- Source Edit
VoiceServerUpdate* = object token: string guild_id: string endpoint: string
- Source Edit
Resumed* = object trace*: seq[string]
- Source Edit
Cache* = ref object lock: Lock version*: int me*: User cacheChannels*: bool cacheGuilds*: bool cacheGuildMembers*: bool cacheUsers*: bool cacheRoles*: bool channels: Table[string, DChannel] guilds: Table[string, Guild] users: Table[string, User] roles: Table[string, Role]
- Source Edit
Ready* = object v*: int user*: User private_channels*: seq[DChannel] session_id*: string guilds*: seq[Guild] trace*: seq[string] user_settings: JsonNode relationships: JsonNode presences: seq[Presence]
- Source Edit
MessageCreate* = object of Message
- Source Edit
MessageUpdate* = object of Message
- Source Edit
MessageDelete* = object of Message
- Source Edit
GuildMemberAdd* = object of GuildMember
- Source Edit
GuildMemberUpdate* = object of GuildMember
- Source Edit
GuildMemberRemove* = object of GuildMember
- Source Edit
GuildMembersChunk* = object guild_id: string query: string limit: int
- Source Edit
GuildCreate* = object of Guild
- Source Edit
GuildUpdate* = object of Guild
- Source Edit
GuildBanAdd* = object of User
- Source Edit
GuildBanRemove* = object of User
- Source Edit
ChannelCreate* = object of DChannel
- Source Edit
ChannelUpdate* = object of DChannel
- Source Edit
ChannelDelete* = object of DChannel
- Source Edit
UserUpdate* = object of User
- Source Edit
VoiceStateUpdate* = object of VoiceState
- Source Edit
MessageReactionAdd* = object of RootObj user_id: string message_id: string channel_id: string emoji: Emoji
- Source Edit
MessageReactionRemove* = object of MessageReactionAdd
- Source Edit
MessageReactionRemoveAll* = object message_id: string channel_id: string
- Source Edit
EventType* = enum channel_create, channel_update, channel_delete, guild_create, guild_update, guild_delete, guild_ban_add, guild_ban_remove, guild_emojis_update, guild_integrations_update, guild_member_add, guild_member_update, guild_member_remove, guild_members_chunk, guild_role_create, guild_role_update, guild_role_delete, message_create, message_update, message_delete, message_delete_bulk, message_reaction_add, message_reaction_remove, message_reaction_remove_all, presence_update, typing_start, user_update, voice_state_update, voice_server_update, on_resume, on_ready
- Source Edit
Session* = ref SessionImpl
- Source Edit
CacheError* = object of Exception
- Source Edit
AddGroupDMUser* = object id: string nick: string
- Source Edit
IdentifyError* = object of Exception
- Source Edit
Consts
permCreateInstantInvite* = 0x00000001
- Source Edit
permKickMembers* = 0x00000002
- Source Edit
permBanMembers* = 0x00000004
- Source Edit
permAdministrator* = 0x00000008
- Source Edit
permManageChannels* = 0x00000010
- Source Edit
permManageGuild* = 0x00000020
- Source Edit
permAddReactions* = 0x00000040
- Source Edit
permViewAuditLogs* = 0x00000080
- Source Edit
permReadMessages* = 0x00000400
- Source Edit
permSendMessages* = 0x00000800
- Source Edit
permSendTTSMessage* = 0x00001000
- Source Edit
permManageMessages* = 0x00002000
- Source Edit
permEmbedLinks* = 0x00004000
- Source Edit
permAttachFiles* = 0x00008000
- Source Edit
permReadMessageHistory* = 0x00010000
- Source Edit
permMentionEveryone* = 0x00020000
- Source Edit
permUseExternalEmojis* = 0x00040000
- Source Edit
permVoiceConnect* = 0x00100000
- Source Edit
permVoiceSpeak* = 0x00200000
- Source Edit
permVoiceMuteMembers* = 0x00400000
- Source Edit
permVoiceDeafenMemebrs* = 0x00800000
- Source Edit
permVoiceMoveMembers* = 0x01000000
- Source Edit
permUseVAD* = 0x02000000
- Source Edit
permChangeNickname* = 0x04000000
- Source Edit
permManageNicknames* = 0x08000000
- Source Edit
permManageRoles* = 0x10000000
- Source Edit
permManageWebhooks* = 0x20000000
- Source Edit
permManageEmojis* = 0x40000000
- Source Edit
permAllText* = permReadMessages or permSendMessages or permSendTTSMessage or permManageMessages or permEmbedLinks or permAttachFiles or permReadMessageHistory or permMentionEveryone
- Source Edit
permAllVoice* = permVoiceConnect or permVoiceSpeak or permVoiceMuteMembers or permVoiceMoveMembers or permVoiceDeafenMemebrs or permUseVAD
- Source Edit
permAllChannel* = permAllText or permAllVoice or permCreateInstantInvite or permManageRoles or permManageChannels or permAddReactions or permViewAuditLogs
- Source Edit
permAll* = permAllChannel or permKickMembers or permBanMembers or permManageGuild or permAdministrator
- Source Edit
Procs
proc addHandler*(s: Session; t: EventType; p: pointer) {.
gcsafe.}- Adds a handler tied to a websocket event Source Edit
proc removeHandler*(s: Session; t: EventType) {.
gcsafe.}- Removes a websocket event handler Source Edit
proc getGuild*(c: Cache; id: string): tuple[guild: Guild, exists: bool]
- Source Edit
proc removeGuild*(c: Cache; guildid: string) {.
raises: CacheError.}- Source Edit
proc updateGuild*(c: Cache; guild: Guild) {.
raises: CacheError.}- Source Edit
proc getUser*(c: Cache; id: string): tuple[user: User, exists: bool]
- Source Edit
proc removeUser*(c: Cache; id: string) {.
raises: CacheError.}- Source Edit
proc updateUser*(c: Cache; user: User) {.
raises: CacheError.}- Source Edit
proc getChannel*(c: Cache; id: string): tuple[channel: DChannel, exists: bool]
- Source Edit
proc updateChannel*(c: Cache; chan: DChannel) {.
raises: CacheError.}- Source Edit
proc removeChannel*(c: Cache; chan: string) {.
raises: CacheError.}- Source Edit
proc getGuildMember*(c: Cache; guild, memberid: string): tuple[member: GuildMember, exists: bool]
- Source Edit
proc addGuildMember*(c: Cache; member: GuildMember)
- Source Edit
proc updateGuildMember*(c: Cache; m: GuildMember)
- Source Edit
proc removeGuildMember*(c: Cache; gmember: GuildMember)
- Source Edit
proc getRole*(c: Cache; guildid, roleid: string): tuple[role: Role, exists: bool]
- Source Edit
proc updateRole*(c: Cache; role: Role) {.
raises: CacheError.}- Source Edit
proc removeRole*(c: Cache; role: string) {.
raises: CacheError.}- Source Edit
proc `$`*(u: User): string {.
gcsafe, inline.}-
Stringifies a user.
e.g: Username#1234
Source Edit proc `$`*(c: DChannel): string {.
gcsafe, inline.}-
Stringifies a channel.
e.g: #channel-name
Source Edit proc `$`*(e: Emoji): string {.
gcsafe, inline.}-
Stringifies an emoji.
e.g: :emojiName:129837192873
Source Edit proc `@`*(u: User): string {.
gcsafe, inline.}-
Returns a message formatted user mention.
e.g: <@109283102983019283>
Source Edit proc `@`*(c: DChannel): string {.
gcsafe, inline.}-
Returns a message formatted channel mention.
e.g: <#1239810283>
Source Edit proc `@`*(r: Role): string {.
gcsafe, inline.}-
Returns a message formatted role mention
e.g: <@&129837128937>
Source Edit proc `@`*(e: Emoji): string {.
gcsafe, inline.}-
Returns a message formated emoji.
e.g: <:emojiName:1920381>
Source Edit proc stripMentions*(msg: Message): string {.
gcsafe.}-
Strips all user mentions from a message and replaces them with plaintext
e.g: <@1901092738173> -> @Username#1234
Source Edit proc stripEveryoneMention*(msg: Message): string {.
gcsafe.}- Strips a message of any @everyone and @here mention Source Edit
proc newChannelParams*(name, topic: string = ""; position: int = 0; bitrate: int = 48; userlimit: int = 0): ChannelParams {.
gcsafe.}- Initialises a new ChannelParams object for altering channel settings. Source Edit
proc newGuildParams*(name, region, afkchan: string = ""; verlvl: int = 0; defnotif: int = 0; afktim: int = 0; icon: string = ""; ownerid: string = ""; splash: string = ""): GuildParams {.
gcsafe.}- Initialises a new GuildParams object for altering guild settings. Source Edit
proc newGuildMemberParams*(nick, channelid: string = ""; roles: seq[string] = @ []; mute: bool = false; deaf: bool = false): GuildMemberParams {.
gcsafe.}- Initialises a new GuildMemberParams object for altering guild members. Source Edit
proc newWebhookParams*(content, username, avatarurl: string = ""; tts: bool = false; embeds: seq[Embed] = nil): WebhookParams {.
gcsafe.}- Initialises a new WebhookParams object for altering webhooks. Source Edit
proc messageGuild*(s: Session; m: Message): string
-
Returns the guild id of the guild the message was sent in.
Returns an empty string if it can't find the guild in the cache or by requesting it from the API.
Source Edit proc NewSession*(args: varargs[string, `$`]): Session {.
gcsafe.}- Creates a new Session Source Edit
proc SessionStart*(s: Session) {.
async, gcsafe.}- Starts a Session Source Edit
Methods
method channel*(s: Session; channel_id: string): Future[DChannel] {.
base, gcsafe, async.}- Returns the channel with the given ID Source Edit
method channelEdit*(s: Session; channelid: string; params: ChannelParams): Future[Guild] {.
base, gcsafe, async.}- Modifies a channel with the ChannelParams Source Edit
method deleteChannel*(s: Session; channelid: string): Future[DChannel] {.
base, gcsafe, async.}- Deletes a channel Source Edit
method channelMessages*(s: Session; channelid: string; before, after, around: string; limit: int): Future[seq[Message]] {.
base, gcsafe, async.}- Returns a channels messages Maximum of 100 messages Source Edit
method channelMessage*(s: Session; channelid, messageid: string): Future[Message] {.
base, gcsafe, async.}- Returns a message from a channel Source Edit
method channelMessageSend*(s: Session; channelid, message: string): Future[Message] {.
base, gcsafe, async.}- Sends a regular text message to a channel Source Edit
method channelMessageSendEmbed*(s: Session; channelid: string; embed: Embed): Future[ Message] {.
base, gcsafe, async.}- Sends an Embed message to a channel Source Edit
method channelMessageSendTTS*(s: Session; channelid, message: string): Future[Message] {.
base, gcsafe, async.}- Sends a TTS message to a channel Source Edit
method channelFileSendWithMessage*(s: Session; channelid, name, message: string): Future[ Message] {.
base, gcsafe, async.}- Sends a file to a channel along with a message Source Edit
method channelFileSend*(s: Session; channelid, name: string): Future[Message] {.
base, gcsafe, async.}- Sends a file to a channel Source Edit
method channelMessageReactionAdd*(s: Session; channelid, messageid, emojiid: string) {.
base, gcsafe, async.}- Adds a reaction to a message Source Edit
method messageDeleteOwnReaction*(s: Session; channelid, messageid, emojiid: string) {.
base, gcsafe, async.}- Deletes your own reaction to a message Source Edit
method messageDeleteReaction*(s: Session; channelid, messageid, emojiid, userid: string) {.
base, gcsafe, async.}- Deletes a reaction from a user from a message Source Edit
method messageGetReactions*(s: Session; channelid, messageid, emojiid: string): Future[ seq[User]] {.
base, gcsafe, async.}- Gets a message's reactions Source Edit
method messageDeleteAllReactions*(s: Session; channelid, messageid: string) {.
base, gcsafe, async.}- Deletes all reactions on a message Source Edit
method messageEdit*(s: Session; channelid, messageid, content: string): Future[Message] {.
base, gcsafe, async.}- Edits a message's contents Source Edit
method channelMessageDelete*(s: Session; channelid, messageid: string) {.
base, gcsafe, async.}- Deletes a message Source Edit
method channelMessageDeleteBulk*(s: Session; channelid: string; messages: seq[string]) {.
base, gcsafe, async.}- Deletes messages in bulk. Will not delete messages older than 2 weeks Source Edit
method channelEditPermissions*(s: Session; channelid: string; overwrite: Overwrite) {.
base, gcsafe, async.}- Edits a channel's permissions Source Edit
method channelInvites*(s: Session; channel: string): Future[seq[Invite]] {.
base, gcsafe, async.}- Returns all invites to a channel Source Edit
method channelCreateInvite*(s: Session; channel: string; max_age, max_uses: int; temp, unique: bool): Future[Invite] {.
base, gcsafe, async.}- Creates an invite to a channel Source Edit
method channelDeletePermission*(s: Session; channel, target: string) {.
base, gcsafe, async.}- Deletes a channel permission Source Edit
method typingIndicatorTrigger*(s: Session; channel: string) {.
base, gcsafe, async.}- Triggers the "X is typing" indicator Source Edit
method channelPinnedMessages*(s: Session; channel: string): Future[seq[Message]] {.
base, gcsafe, async.}- Returns all pinned messages in a channel Source Edit
method channelPinMessage*(s: Session; channel, message: string) {.
base, gcsafe, async.}- Pins a message in a channel Source Edit
method channelDeletePinnedMessage*(s: Session; channel, message: string) {.
base, gcsafe, async.}- Source Edit
method groupDMCreate*(s: Session; accesstokens: seq[string]; nicks: seq[AddGroupDMUser]): Future[DChannel] {.
base, gcsafe, async.}- Creates a group DM channel Source Edit
method groupDMAddUser*(s: Session; channelid, userid, access_token, nick: string) {.
base, gcsafe, async.}- Adds a user to a group dm. Requires the 'gdm.join' scope. Source Edit
method groupdDMRemoveUser*(s: Session; channelid, userid: string) {.
base, gcsafe, async.}- Removes a user from a group dm. Source Edit
method createGuild*(s: Session; name: string): Future[Guild] {.
base, gcsafe, async.}- Creates a guild. This endpoint is limited to 10 active guilds Source Edit
method guild*(s: Session; id: string): Future[Guild] {.
base, gcsafe, async.}- Gets a guild Source Edit
method guildModify*(s: Session; guild: string; settings: GuildParams): Future[Guild] {.
base, gcsafe, async.}- Modifies a guild with the GuildParams Source Edit
method deleteGuild*(s: Session; guild: string): Future[Guild] {.
base, gcsafe, async.}- Deletes a guild Source Edit
method guildChannels*(s: Session; guild: string): Future[seq[DChannel]] {.
base, gcsafe, async.}- Returns all guild channels Source Edit
method guildChannelCreate*(s: Session; guild, channelname: string; voice: bool): Future[ DChannel] {.
base, gcsafe, async.}- Creates a new channel in a guild Source Edit
method guildChannelPositionEdit*(s: Session; guild, channel: string; position: int): Future[ seq[DChannel]] {.
base, gcsafe, async.}- Reorders the position of a channel and returns the new order Source Edit
method guildMembers*(s: Session; guild: string; limit, after: int): Future[ seq[GuildMember]] {.
base, gcsafe, async.}- Returns up to 1000 guild members Source Edit
method guildMember*(s: Session; guild, userid: string): Future[GuildMember] {.
base, gcsafe, async.}- Returns a guild member with the userid Source Edit
method guildAddMember*(s: Session; guild, userid, accesstoken: string): Future[ GuildMember] {.
base, gcsafe, async.}- Adds a guild member to the guild Source Edit
method guildMemberRoles*(s: Session; guild, userid: string; roles: seq[string]) {.
base, gcsafe, async.}- Modifies a guild member's roles Source Edit
method guildMemberNick*(s: Session; guild, userid, nick: string) {.
base, gcsafe, async.}- Sets the nickname of a member Source Edit
method guildMemberMute*(s: Session; guild, userid: string; mute: bool) {.
base, gcsafe, async.}- Mutes a guild member Source Edit
method guildMemberDeafen*(s: Session; guild, userid: string; deafen: bool) {.
base, gcsafe, async.}- Deafens a guild member Source Edit
method guildMemberMove*(s: Session; guild, userid, channel: string) {.
base, gcsafe, async.}- Moves a guild member from one channel to another only works if they are connected to a voice channel Source Edit
method nick*(s: Session; guild, nick: string) {.
base, gcsafe, async.}- Sets the nick for the current user Source Edit
method guildMemberAddRole*(s: Session; guild, userid, roleid: string) {.
base, gcsafe, async.}- Adds a role to a guild member Source Edit
method guildMemberRemoveRole*(s: Session; guild, userid, roleid: string) {.
base, gcsafe, async.}- Removes a role from a guild member Source Edit
method guildRemoveMember*(s: Session; guild, userid: string) {.
base, gcsafe, async.}- Removes a guild membe from the guild Source Edit
method guildBans*(s: Session; guild: string): Future[seq[User]] {.
base, gcsafe, async.}- Returns all users who have been banned from the guild Source Edit
method guildUserBan*(s: Session; guild, userid: string) {.
base, gcsafe, async.}- Bans a user from the guild Source Edit
method guildRemoveBan*(s: Session; guild, userid: string) {.
base, gcsafe, async.}- Removes a ban from the guild Source Edit
method guildRoles*(s: Session; guild: string): Future[seq[Role]] {.
base, gcsafe, async.}- Returns all guild roles Source Edit
method guildRole*(s: Session; guild, roleid: string): Future[Role] {.
base, gcsafe, async.}- Returns a role with the given id. Source Edit
method guildCreateRole*(s: Session; guild: string): Future[Role] {.
base, gcsafe, async.}- Creates a new role in the guild Source Edit
method guildEditRolePosition*(s: Session; guild: string; roles: seq[Role]): Future[ seq[Role]] {.
base, gcsafe, async.}- Edits the positions of a guilds roles roles and returns the new roles order Source Edit
method guildEditRole*(s: Session; guild, roleid, name: string; permissions, color: int; hoist, mentionable: bool): Future[Role] {.
base, gcsafe, async.}- Edits a role Source Edit
method guildDeleteRole*(s: Session; guild, roleid: string) {.
base, gcsafe, async.}- Deletes a role Source Edit
method guildPruneCount*(s: Session; guild: string; days: int): Future[int] {.
base, gcsafe, async.}- Returns the number of members who would get kicked during a prune operation Source Edit
method guildPruneBegin*(s: Session; guild: string; days: int): Future[int] {.
base, gcsafe, async.}- Begins a prune operation and kicks all members who haven't been active for N days Source Edit
method guildVoiceRegions*(s: Session; guild: string): Future[seq[VoiceRegion]] {.
base, gcsafe, async.}- Lists all voice regions in a guild Source Edit
method guildInvites*(s: Session; guild: string): Future[seq[Invite]] {.
base, gcsafe, async.}- Lists all guild invites Source Edit
method guildIntegrations*(s: Session; guild: string): Future[seq[Integration]] {.
base, gcsafe, async.}- Lists all guild integrations Source Edit
method guildIntegrationCreate*(s: Session; guild, typ, id: string) {.
base, gcsafe, async.}- Creates a new guild integration Source Edit
method guildIntegrationEdit*(s: Session; guild, integrationid: string; behaviour, grace: int; emotes: bool) {.
base, gcsafe, async.}- Edits a guild integration Source Edit
method guildIntegrationDelete*(s: Session; guild, integration: string) {.
base, gcsafe, async.}- Deletes a guild Integration Source Edit
method guildIntegrationSync*(s: Session; guild, integration: string) {.
base, gcsafe, async.}- Syncs an existing guild integration Source Edit
method guildEmbed*(s: Session; guild: string): Future[GuildEmbed] {.
base, gcsafe, async.}- Gets a GuildEmbed Source Edit
method guildEmbedEdit*(s: Session; guild: string; enabled: bool; channel: string): Future[ GuildEmbed] {.
base, gcsafe, async.}- Edits a GuildEmbed Source Edit
method invite*(s: Session; code: string): Future[Invite] {.
base, gcsafe, async.}- Gets an invite with code Source Edit
method inviteDelete*(s: Session; code: string): Future[Invite] {.
base, gcsafe, async.}- Deletes an invite Source Edit
method me*(s: Session): Future[User] {.
base, gcsafe, async.}- Returns the current user Source Edit
method user*(s: Session; userid: string): Future[User] {.
base, gcsafe, async.}- Gets a user Source Edit
method usernameEdit*(s: Session; name: string): Future[User] {.
base, gcsafe, async.}- Edits the current users username Source Edit
method avatarEdit*(s: Session; avatar: string): Future[User] {.
base, gcsafe, async.}- Changes the current users avatar Source Edit
method currentUserGuilds*(s: Session): Future[seq[UserGuild]] {.
base, gcsafe, async.}- Lists the current users guilds Source Edit
method leaveGuild*(s: Session; guild: string) {.
base, gcsafe, async.}- Makes the current user leave the specified guild Source Edit
method activePrivateChannels*(s: Session): Future[seq[DChannel]] {.
base, gcsafe, async.}- Lists all active DM channels Source Edit
method privateChannelCreate*(s: Session; recipient: string): Future[DChannel] {.
base, gcsafe, async.}- Creates a new DM channel Source Edit
method voiceRegions*(s: Session): Future[seq[VoiceRegion]] {.
base, gcsafe, async.}- Lists all voice regions Source Edit
method webhookCreate*(s: Session; channel, name, avatar: string): Future[Webhook] {.
base, gcsafe, async.}- Creates a webhook Source Edit
method channelWebhooks*(s: Session; channel: string): Future[seq[Webhook]] {.
base, gcsafe, async.}- Lists all webhooks in a channel Source Edit
method guildWebhooks*(s: Session; guild: string): Future[seq[Webhook]] {.
base, gcsafe, async.}- Lists all webhooks in a guild Source Edit
method getWebhookWithToken*(s: Session; webhook, token: string): Future[Webhook] {.
base, gcsafe, async.}- Gets a webhook with a token Source Edit
method webhookEdit*(s: Session; webhook, name, avatar: string): Future[Webhook] {.
base, gcsafe, async.}- Edits a webhook Source Edit
method webhookEditWithToken*(s: Session; webhook, token, name, avatar: string): Future[ Webhook] {.
base, gcsafe, async.}- Edits a webhook with a token Source Edit
method webhookDelete*(s: Session; webhook: string): Future[Webhook] {.
base, gcsafe, async.}- Deletes a webhook Source Edit
method webhookDeleteWithToken*(s: Session; webhook, token: string): Future[Webhook] {.
base, gcsafe, async.}- Deltes a webhook with a token Source Edit
method executeWebhook*(s: Session; webhook, token: string; wait: bool; payload: WebhookParams) {.
base, gcsafe, async.}- Executes a webhook Source Edit
method updateStreamingStatus*(s: Session; idle: int; game: string; url: string) {.
base.}- Source Edit