diff --git a/README.md b/README.md index f9809f6..58ba35d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Why Dimscord? * What is Nim? * Nim is a statically-typed programming language (older than go and rust) that compiles to C/C++/JavaScript. It is similar to Python, easier to learn and it's flexible. [You can read it more in the official website for Nim.](https://nim-lang.org) - * Why even use Nim for discord bots? + * Why use Nim for discord bots? * Since it's easier to learn, it's more faster than any other interpreted languages, which is beneficial, for larger discord bots, so they could run faster. [You can read the Nim FAQ here](https://nim-lang.org/faq.html) diff --git a/dimscord.nimble b/dimscord.nimble index 64027da..81f41c0 100644 --- a/dimscord.nimble +++ b/dimscord.nimble @@ -1,6 +1,6 @@ # Package -version = "1.0.1" +version = "1.0.6" author = "KrispPurg" description = "A Discord Bot & REST Library for Nim." license = "MIT" diff --git a/docs/dimscord.html b/docs/dimscord.html index 756ecd2..2a6c7a1 100644 --- a/docs/dimscord.html +++ b/docs/dimscord.html @@ -135,7 +135,7 @@

Reference

Modules required

Sometimes you would need some modules in order to use in procedures, for example if you were to edit a guild member you would need to import options to provide an Option type.

@@ -147,7 +147,7 @@

Imports

Exports

-endSession, voiceStateUpdate, dimscord/gateway, disconnect, updateStatus, startSession, requestGuildMembers, latency, createGuildChannel, getGuildVoiceRegions, deleteMessageReaction, getGuildInvites, getChannelMessages, getGuildIntegrations, DiscordFile, getGuildChannel, getGateway, deleteWebhook, getChannelMessage, getVoiceRegions, RestError, beginGuildPrune, syncGuildIntegration, deleteGuildRole, editGuildRole, getGuildBan, createChannelInvite, getWebhook, deleteGuildIntegration, getGuildBans, deleteMessageReactionEmoji, editWebhook, addMessageReaction, editCurrentUser, createGuild, getChannelWebhooks, deleteChannel, getChannelInvites, bulkDeleteMessages, deleteGuild, AllowedMentions, leaveGuild, setGuildNick, getGuildVanityUrl, editGuildIntegration, createGuildBan, getGuildAuditLogs, deleteAllMessageReactions, editGuild, deleteGuildEmoji, executeWebhook, createGuildEmoji, removeGuildMember, editGuildChannelPositions, getGuildMember, createWebhook, editGuildChannel, deleteGuildChannelPermission, getGuildPreview, editGuildChannelPermissions, triggerTypingIndicator, editGuildMember, getMessageReactions, createUserDm, getGuildChannels, addGuildMember, getGuildEmbed, getGatewayBot, getChannelPins, createGroupDm, sendMessage, getGuild, addChannelMessagePin, executeSlackWebhook, deleteChannelMessagePin, getGuildWebhooks, getGuildPruneCount, editGuildEmbed, deleteMessage, dimscord/restapi, removeGuildBan, getGuildMembers, deleteInvite, getUser, editGuildRolePosition, executeGithubWebhook, getInvite, createGuildRole, editMessage, editGuildEmoji, getCurrentApplication, removeGuildMemberRole, addGuildMemberRole, getCurrentUser, getGuildRoles, aleRoleCreate, endpointGuildEmbed, vlNone, permManageNicknames, cdnIcons, endpointGuildRoles, endpointUserChannels, giGuildIntegrations, permAll, afSync, ctGroupDM, permManageGuild, giGuilds, aleRoleUpdate, aleMemberUpdate, mtUserGuildBoostTier3, giGuildMessageReactions, giGuildMessages, endpointBulkDeleteMessages, permReadMessageHistory, endpointGuildBans, aleIntegrationDelete, endpointGuildIntegrationsSync, alcRoles, ptNone, cdnAppAssets, giGuildWebhooks, permViewAuditLogs, cdnSplashes, ctDirect, endpointGuildMembersRole, permManageMessages, PermEnum, ecfMembersWithoutRoles, cdnAvatars, giGuildEmojis, ptTier2, endpointGuildChannels, endpointWebhookTokenSlack, aleMemberRoleUpdate, matJoin, libAgent, cdnDefaultUserAvatars, cdnAppIcons, permSendMessages, permPrioritySpeaker, gatCustom, matJoinRequest, giDirectMessageReactions, permVoiceMoveMembers, cdnChannelIcons, endpointGuildEmojis, mtUserGuildBoost, endpointGuildPreview, aleWebhookDelete, aleInviteDelete, aleEmojiUpdate, cdnAttachments, endpointGuildMembersNick, permAttachFiles, mtDefault, afJoinRequest, aleBotAdd, afJoin, permKickMembers, permViewChannel, log, aleChannelCreate, permManageChannels, ctGuildText, aleMemberMove, endpointUsers, permVoiceMuteMembers, ActivityFlags, aleChannelOverwriteCreate, aleMemberPrune, endpointVoiceRegions, aleMessagePin, mtGuildMemberJoin, alcInt, permAllChannel, permBanMembers, restBase, permMentionEveryone, aleInviteCreate, endpointInvites, whIncoming, endpointWebhooks, whFollower, alcString, permChangeNickname, permCreateInstantInvite, AuditLogChangeKind, log, afPlay, permEmbedLinks, vlMedium, endpointOAuth2Application, ptTier1, mtChannelIconChange, endpointUserGuilds, permSendTTSMessage, aleWebhookUpdate, permVoiceStream, ctGuildNews, gatSteaming, mtCall, mnlOnlyMentions, endpointTriggerTyping, aleEmojiCreate, endpointWebhookTokenGithub, endpointGuildVanity, mtChannelNameChange, endpointGuildMembers, endpointChannelPermissions, giGuildMessageTyping, mtUserGuildBoostTier1, endpointChannelInvites, endpointGuildIntegrations, vlVeryHigh, gatPlaying, permUseVAD, aleGuildUpdate, endpointGuildRegions, endpointGuildInvites, permManageRoles, mtChannelPinnedMessage, giGuildVoiceStates, endpointReactions, alcBool, tmsAccepted, permVoiceSpeak, cdnDiscoverySplashes, permManageEmojis, giGuildPresences, permViewGuildInsights, matSpectate, aleIntegrationUpdate, endpointChannelPins, endpointChannelOverwrites, iebRemoveRole, aleMessageUnpin, aleMemberKick, endpointChannelMessages, permUseExternalEmojis, afSpectate, aleMessageDelete, permAddReactions, alcNil, libVer, aleEmojiDelete, aleIntegrationCreate, ctGuildStore, mtUserGuildBoostTier2, iebKick, permAllText, mfaElevated, giDirectMessages, giGuildInvites, endpointWebhookToken, mnlAllMessages, vlHigh, ecfDisabled, ctGuildVoice, ctGuildParent, ecfAllMembers, permVoiceConnect, tmsInvited, endpointGuildAuditLogs, aleMemberBanAdd, endpointGroupRecipient, mtRecipientAdd, permManageWebhooks, permVoiceDeafenMembers, libName, aleMemberDisconnect, permAdministrator, mfaNone, aleMemberBanRemove, endpointChannelWebhooks, gatListening, cdnBase, giGuildBans, aleRoleDelete, cdnTeamIcons, endpointChannels, endpointGuilds, cdnCustomEmojis, alcOverwrites, GatewayIntent, permAllVoice, endpointGuildPrune, mtChannelFollowAdd, aleInviteUpdate, giGuildMembers, mtRecipientRemove, giDirectMessageTyping, aleChannelDelete, afInstance, aleChannelUpdate, aleChannelOverwriteDelete, aleWebhookCreate, endpointGuildWebhooks, vlLow, matListen, dimscord/constants, aleMessageBulkDelete, aleChannelOverwriteUpdate, ptTier3, gatWatching, InviteCreate, Integration, TypingStart, GameStatus, VoiceRegion, newOAuth2Application, Member, newVoiceState, PartialGuild, VoiceState, newGuildChannel, Role, GameActivity, GatewaySession, newInviteCreate, newReady, GuildPreview, PermObj, Attachment, InviteMetadata, EmbedProvider, Events, newDMChannel, newReaction, newAuditLog, Invite, newDiscordClient, newOverwrite, newShard, Ratelimit, User, Presence, UnavailableGuild, AuditLogChangeValue, GuildChannel, GuildMembersChunk, newInvite, Ready, newGuildMembersChunk, newInviteMetadata, CacheError, Webhook, AuditLogOptions, newRole, CacheTablePrefs, Message, MentionChannel, clear, Reaction, updateMessage, EmbedFooter, EmbedAuthor, CacheTable, newMember, GameAssets, Guild, Overwrite, RestApi, Channel, MessageReference, kind, EmbedThumbnail, newTypingStart, newGuildBan, $, Embed, EmbedVideo, OAuth2Application, DMChannel, EmbedImage, EmbedField, GuildBan, TeamMember, Shard, newGameActivity, AuditLog, newWebhook, PartialChannel, Team, newPresence, newGuild, newUser, dimscord/objects, GatewayBot, Emoji, newEmoji, Application, AuditLogEntry, DiscordClient, newMessage, defaultAvatarUrl, computePerms, stripMentions, computePerms, permCheck, stripRoleMentions, stripChannelMentions, computePerms, avatarUrl, dimscord/misc, perms, $, $, @, genInviteLink, timestamp, @, @, permCheck, getGuildWidget, iconUrl, stripUserMentions, iconUrl +resume, endSession, updateStatus, dimscord/gateway, disconnect, voiceStateUpdate, startSession, requestGuildMembers, latency, createGuildChannel, getGuildVoiceRegions, deleteMessageReaction, getGuildInvites, getChannelMessages, getGuildIntegrations, DiscordFile, getGuildChannel, getGateway, deleteWebhook, getChannelMessage, getVoiceRegions, RestError, beginGuildPrune, syncGuildIntegration, deleteGuildRole, editGuildRole, getGuildBan, createChannelInvite, getWebhook, deleteGuildIntegration, getGuildBans, deleteMessageReactionEmoji, editWebhook, addMessageReaction, editCurrentUser, createGuild, getChannelWebhooks, deleteChannel, getChannelInvites, bulkDeleteMessages, deleteGuild, AllowedMentions, leaveGuild, setGuildNick, getGuildVanityUrl, editGuildIntegration, createGuildBan, getGuildAuditLogs, deleteAllMessageReactions, editGuild, deleteGuildEmoji, executeWebhook, createGuildEmoji, removeGuildMember, editGuildChannelPositions, getGuildMember, createWebhook, editGuildChannel, deleteGuildChannelPermission, getGuildPreview, editGuildChannelPermissions, triggerTypingIndicator, editGuildMember, getMessageReactions, createUserDm, getGuildChannels, addGuildMember, getGuildEmbed, getGatewayBot, getChannelPins, createGroupDm, sendMessage, getGuild, addChannelMessagePin, executeSlackWebhook, deleteChannelMessagePin, getGuildWebhooks, getGuildPruneCount, editGuildEmbed, deleteMessage, dimscord/restapi, removeGuildBan, getGuildMembers, deleteInvite, getUser, editGuildRolePosition, executeGithubWebhook, getInvite, createGuildRole, editMessage, editGuildEmoji, getCurrentApplication, removeGuildMemberRole, addGuildMemberRole, getCurrentUser, getGuildRoles, aleRoleCreate, endpointGuildEmbed, vlNone, permManageNicknames, cdnIcons, endpointGuildRoles, endpointUserChannels, giGuildIntegrations, permAll, afSync, ctGroupDM, permManageGuild, giGuilds, aleRoleUpdate, aleMemberUpdate, mtUserGuildBoostTier3, giGuildMessageReactions, giGuildMessages, endpointBulkDeleteMessages, permReadMessageHistory, endpointGuildBans, aleIntegrationDelete, endpointGuildIntegrationsSync, alcRoles, ptNone, cdnAppAssets, giGuildWebhooks, permViewAuditLogs, cdnSplashes, ctDirect, endpointGuildMembersRole, permManageMessages, PermEnum, ecfMembersWithoutRoles, cdnAvatars, giGuildEmojis, ptTier2, endpointGuildChannels, endpointWebhookTokenSlack, aleMemberRoleUpdate, matJoin, libAgent, cdnDefaultUserAvatars, cdnAppIcons, permSendMessages, permPrioritySpeaker, gatCustom, matJoinRequest, giDirectMessageReactions, permVoiceMoveMembers, cdnChannelIcons, endpointGuildEmojis, mtUserGuildBoost, endpointGuildPreview, aleWebhookDelete, aleInviteDelete, aleEmojiUpdate, cdnAttachments, endpointGuildMembersNick, permAttachFiles, mtDefault, afJoinRequest, aleBotAdd, afJoin, permKickMembers, permViewChannel, log, aleChannelCreate, permManageChannels, ctGuildText, aleMemberMove, endpointUsers, permVoiceMuteMembers, ActivityFlags, aleChannelOverwriteCreate, aleMemberPrune, endpointVoiceRegions, aleMessagePin, mtGuildMemberJoin, alcInt, permAllChannel, permBanMembers, restBase, permMentionEveryone, aleInviteCreate, endpointInvites, whIncoming, endpointWebhooks, whFollower, alcString, permChangeNickname, permCreateInstantInvite, AuditLogChangeKind, log, afPlay, permEmbedLinks, vlMedium, endpointOAuth2Application, ptTier1, mtChannelIconChange, endpointUserGuilds, permSendTTSMessage, aleWebhookUpdate, permVoiceStream, ctGuildNews, gatPlaying, mtCall, mnlOnlyMentions, endpointTriggerTyping, aleEmojiCreate, endpointWebhookTokenGithub, endpointGuildVanity, mtChannelNameChange, endpointGuildMembers, endpointChannelPermissions, giGuildMessageTyping, mtUserGuildBoostTier1, endpointChannelInvites, endpointGuildIntegrations, vlVeryHigh, permUseVAD, aleGuildUpdate, endpointGuildRegions, endpointGuildInvites, permManageRoles, mtChannelPinnedMessage, giGuildVoiceStates, endpointReactions, alcBool, tmsAccepted, permVoiceSpeak, cdnDiscoverySplashes, permManageEmojis, giGuildPresences, permViewGuildInsights, matSpectate, aleIntegrationUpdate, endpointChannelPins, endpointChannelOverwrites, iebRemoveRole, aleMessageUnpin, aleMemberKick, endpointChannelMessages, permUseExternalEmojis, afSpectate, aleMessageDelete, permAddReactions, alcNil, libVer, aleEmojiDelete, aleIntegrationCreate, ctGuildStore, mtUserGuildBoostTier2, iebKick, permAllText, mfaElevated, giDirectMessages, giGuildInvites, endpointWebhookToken, mnlAllMessages, vlHigh, ecfDisabled, ctGuildVoice, ctGuildParent, ecfAllMembers, permVoiceConnect, tmsInvited, endpointGuildAuditLogs, aleMemberBanAdd, endpointGroupRecipient, mtRecipientAdd, permManageWebhooks, permVoiceDeafenMembers, libName, aleMemberDisconnect, permAdministrator, mfaNone, aleMemberBanRemove, endpointChannelWebhooks, gatListening, cdnBase, giGuildBans, aleRoleDelete, cdnTeamIcons, endpointChannels, endpointGuilds, cdnCustomEmojis, alcOverwrites, GatewayIntent, permAllVoice, endpointGuildPrune, mtChannelFollowAdd, aleInviteUpdate, giGuildMembers, gatStreaming, mtRecipientRemove, giDirectMessageTyping, aleChannelDelete, afInstance, aleChannelUpdate, aleChannelOverwriteDelete, aleWebhookCreate, endpointGuildWebhooks, vlLow, matListen, dimscord/constants, aleMessageBulkDelete, aleChannelOverwriteUpdate, ptTier3, gatWatching, InviteCreate, Integration, TypingStart, GameStatus, VoiceRegion, newOAuth2Application, Member, newVoiceState, PartialGuild, VoiceState, newGuildChannel, Role, GameActivity, GatewaySession, newInviteCreate, newReady, GuildPreview, PermObj, Attachment, InviteMetadata, EmbedProvider, Events, newDMChannel, newReaction, newAuditLog, Invite, newDiscordClient, newOverwrite, newShard, Ratelimit, User, Presence, UnavailableGuild, AuditLogChangeValue, GuildChannel, GuildMembersChunk, newInvite, Ready, newGuildMembersChunk, newInviteMetadata, CacheError, Webhook, AuditLogOptions, newRole, CacheTablePrefs, Message, MentionChannel, clear, Reaction, updateMessage, EmbedFooter, EmbedAuthor, CacheTable, newMember, GameAssets, Guild, Overwrite, RestApi, Channel, MessageReference, kind, EmbedThumbnail, newTypingStart, newGuildBan, $, Embed, EmbedVideo, OAuth2Application, DMChannel, EmbedImage, EmbedField, GuildBan, TeamMember, Shard, newGameActivity, AuditLog, newWebhook, PartialChannel, Team, newPresence, newGuild, newUser, dimscord/objects, GatewayBot, Emoji, newEmoji, Application, AuditLogEntry, DiscordClient, newMessage, defaultAvatarUrl, computePerms, stripMentions, computePerms, permCheck, stripRoleMentions, stripChannelMentions, computePerms, avatarUrl, dimscord/misc, perms, $, $, @, genInviteLink, timestamp, @, @, permCheck, getGuildWidget, iconUrl, stripUserMentions, iconUrl
@@ -157,7 +157,7 @@

Exports

diff --git a/docs/dimscord/constants.html b/docs/dimscord/constants.html index 9b3e697..be11d11 100644 --- a/docs/dimscord/constants.html +++ b/docs/dimscord/constants.html @@ -254,8 +254,8 @@

dimscord/constants

title="ptTier3 = 3">ptTier3
  • gatPlaying
  • -
  • gatSteaming
  • +
  • gatStreaming
  • gatListening
  • Consts Edit - -
    gatSteaming = 1
    + +
    gatStreaming = 1
    @@ -2173,7 +2173,7 @@

    Procs

    diff --git a/docs/dimscord/constants.idx b/docs/dimscord/constants.idx index a572bb4..c250a90 100644 --- a/docs/dimscord/constants.idx +++ b/docs/dimscord/constants.idx @@ -117,7 +117,7 @@ ptTier1 dimscord/constants.html#ptTier1 constants: ptTier1 ptTier2 dimscord/constants.html#ptTier2 constants: ptTier2 ptTier3 dimscord/constants.html#ptTier3 constants: ptTier3 gatPlaying dimscord/constants.html#gatPlaying constants: gatPlaying -gatSteaming dimscord/constants.html#gatSteaming constants: gatSteaming +gatStreaming dimscord/constants.html#gatStreaming constants: gatStreaming gatListening dimscord/constants.html#gatListening constants: gatListening gatWatching dimscord/constants.html#gatWatching constants: gatWatching gatCustom dimscord/constants.html#gatCustom constants: gatCustom diff --git a/docs/dimscord/dispatch.html b/docs/dimscord/dispatch.html index 2bed13c..82e5811 100644 --- a/docs/dimscord/dispatch.html +++ b/docs/dimscord/dispatch.html @@ -149,7 +149,7 @@

    Procs

    diff --git a/docs/dimscord/gateway.html b/docs/dimscord/gateway.html index 63e892e..d73786a 100644 --- a/docs/dimscord/gateway.html +++ b/docs/dimscord/gateway.html @@ -109,9 +109,12 @@

    dimscord/gateway

  • updateStatus
  • -
  • requestGuildMembers
  • +
  • resume
  • +
  • requestGuildMembers
  • voiceStateUpdate
  • @@ -155,24 +158,34 @@

    Procs

    Updates the shard's status.   Source -Edit +Edit
    - -
    proc requestGuildMembers(s: Shard; guild_id: seq[string]; limit: int;
    -                        query, nonce = ""; presences = false;
    -                        user_ids: seq[string] = @[]): owned(Future[void]) {...}{.
    -    raises: [Exception, FutureError],
    +
    +
    proc resume(s: Shard): owned(Future[void]) {...}{.raises: [Exception, FutureError],
         tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect].}
    + +  Source +Edit + +
    + +
    proc requestGuildMembers(s: Shard; guild_id: string or seq[string]; limit = none int;
    +                        query = none string; nonce = ""; presences = false;
    +                        user_ids: seq[string] = @[]): owned(Future[void])
    +
    + Requests the offline members to a guild. (See: https://discord.com/developers/docs/topics/gateway#request-guild-members)   Source -Edit +Edit
    @@ -264,7 +277,7 @@

    Procs

    diff --git a/docs/dimscord/gateway.idx b/docs/dimscord/gateway.idx index 2d71a19..38d9e07 100644 --- a/docs/dimscord/gateway.idx +++ b/docs/dimscord/gateway.idx @@ -1,5 +1,6 @@ updateStatus dimscord/gateway.html#updateStatus,Shard,string gateway: updateStatus(s: Shard; game = none GameStatus; status = "online"; afk = false): owned(\n Future[void]) -requestGuildMembers dimscord/gateway.html#requestGuildMembers,Shard,seq[string],int,string,string,seq[string] gateway: requestGuildMembers(s: Shard; guild_id: seq[string]; limit: int; query, nonce = "";\n presences = false; user_ids: seq[string] = @[]): owned(Future[void]) +resume dimscord/gateway.html#resume,Shard gateway: resume(s: Shard): owned(Future[void]) +requestGuildMembers dimscord/gateway.html#requestGuildMembers,Shard,,string,seq[string] gateway: requestGuildMembers(s: Shard; guild_id: string or seq[string]; limit = none int;\n query = none string; nonce = ""; presences = false;\n user_ids: seq[string] = @[]): owned(Future[void]) voiceStateUpdate dimscord/gateway.html#voiceStateUpdate,Shard,string gateway: voiceStateUpdate(s: Shard; guild_id: string; channel_id = none string;\n self_mute, self_deaf = false): owned(Future[void]) disconnect dimscord/gateway.html#disconnect,Shard gateway: disconnect(s: Shard; should_reconnect = true): owned(Future[void]) endSession dimscord/gateway.html#endSession,DiscordClient gateway: endSession(cl: DiscordClient): owned(Future[void]) diff --git a/docs/dimscord/misc.html b/docs/dimscord/misc.html index 34dc445..6ac56ad 100644 --- a/docs/dimscord/misc.html +++ b/docs/dimscord/misc.html @@ -432,7 +432,7 @@

    Procs

    diff --git a/docs/dimscord/objects.html b/docs/dimscord/objects.html index e1886f2..7b07d91 100644 --- a/docs/dimscord/objects.html +++ b/docs/dimscord/objects.html @@ -213,6 +213,8 @@

    dimscord/objects

    title="User = ref object id*, username*, discriminator*: string bot*, system*: bool + premium_type*, flags*: Option[int] + public_flags*: Option[int] avatar*: Option[string]">User
  • dimscord/objects reacted*: bool">Reaction
  • Emoji
  • @@ -299,16 +301,15 @@

    dimscord/objects

  • Presence
  • + client_status*: tuple[web, desktop, mobile: string]">Presence
  • dimscord/objects self_deaf*, self_mute*, self_stream*: bool">VoiceState
  • Role
  • dimscord/objects title="Overwrite = object id*, kind*: string allow*, deny*: int + allow_new*, deny_new*: string permObj*: PermObj">Overwrite
  • Types
    User = ref object
       id*, username*, discriminator*: string
       bot*, system*: bool
    +  premium_type*, flags*: Option[int]
    +  public_flags*: Option[int]
       avatar*: Option[string]
     
    @@ -922,9 +926,9 @@

    Types

      Source -Edit +Edit
    @@ -938,9 +942,9 @@

    Types

      Source -Edit +Edit @@ -953,14 +957,14 @@

    Types

      Source -Edit +Edit
    Emoji = object
    -  id*, name*: string
    +  id*, name*: Option[string]
       require_colons*, managed*, animated*: Option[bool]
       user*: User
       roles*: seq[string]
    @@ -969,9 +973,9 @@ 

    Types

      Source -Edit +Edit @@ -983,9 +987,9 @@

    Types

      Source -Edit +Edit @@ -998,9 +1002,9 @@

    Types

      Source -Edit +Edit @@ -1012,9 +1016,9 @@

    Types

      Source -Edit +Edit @@ -1026,9 +1030,9 @@

    Types

      Source -Edit +Edit @@ -1043,9 +1047,9 @@

    Types

      Source -Edit +Edit @@ -1059,9 +1063,9 @@

    Types

      Source -Edit +Edit @@ -1079,9 +1083,9 @@

    Types

      Source -Edit +Edit @@ -1093,9 +1097,9 @@

    Types

      Source -Edit +Edit @@ -1115,34 +1119,33 @@

    Types

      Source -Edit +Edit
    Presence = object
       user*: User
    -  roles*: seq[string]
       game*: Option[GameActivity]
       guild_id*, status*: string
       activities*: seq[GameActivity]
       client_status*: tuple[web, desktop, mobile: string]
    -  premium_since*, nick*: Option[string]
     
      Source -Edit +Edit
    Guild = ref object
       id*, name*, owner_id*: string
       region*, preferred_locale*: string
    +  permissions_new*: Option[string]
       description*, banner*: Option[string]
       public_updates_channel_id*: Option[string]
       icon*, splash*, discovery_splash*: Option[string]
    @@ -1184,14 +1187,14 @@ 

    Types

      Source -Edit +Edit
    Role = object
    -  id*, name*: string
    +  id*, name*, permissions_new*: string
       color*, position*, permissions*: int
       hoist*, managed*, mentionable*: bool
     
    @@ -1199,9 +1202,9 @@

    Types

      Source -Edit +Edit @@ -1214,24 +1217,25 @@

    Types

    This is used for status updates.   Source -Edit +Edit
    Overwrite = object
       id*, kind*: string
       allow*, deny*: int
    +  allow_new*, deny_new*: string
       permObj*: PermObj
     
      Source -Edit +Edit
    @@ -1242,9 +1246,9 @@

    Types

      Source -Edit +Edit @@ -1256,9 +1260,9 @@

    Types

      Source -Edit +Edit @@ -1270,9 +1274,9 @@

    Types

      Source -Edit +Edit @@ -1284,9 +1288,9 @@

    Types

    Used for creating guilds.   Source -Edit +Edit @@ -1300,9 +1304,9 @@

    Types

      Source -Edit +Edit @@ -1315,9 +1319,9 @@

    Types

      Source -Edit +Edit @@ -1336,9 +1340,9 @@

    Types

      Source -Edit +Edit @@ -1354,9 +1358,9 @@

    Types

      Source -Edit +Edit @@ -1370,9 +1374,9 @@

    Types

      Source -Edit +Edit @@ -1389,9 +1393,9 @@

    Types

      Source -Edit +Edit @@ -1405,9 +1409,9 @@

    Types

      Source -Edit +Edit @@ -1423,9 +1427,9 @@

    Types

      Source -Edit +Edit @@ -1437,9 +1441,9 @@

    Types

      Source -Edit +Edit @@ -1454,9 +1458,9 @@

    Types

      Source -Edit +Edit @@ -1473,9 +1477,9 @@

    Types

      Source -Edit +Edit @@ -1489,9 +1493,9 @@

    Types

      Source -Edit +Edit @@ -1504,9 +1508,9 @@

    Types

      Source -Edit +Edit @@ -1520,9 +1524,9 @@

    Types

      Source -Edit +Edit @@ -1551,9 +1555,9 @@

    Types

      Source -Edit +Edit @@ -1568,9 +1572,9 @@

    Types

      Source -Edit +Edit @@ -1584,9 +1588,9 @@

    Types

      Source -Edit +Edit @@ -1598,9 +1602,9 @@

    Types

      Source -Edit +Edit @@ -1613,9 +1617,9 @@

    Types

      Source -Edit +Edit @@ -1668,9 +1672,9 @@

    Types

    For reference

      Source -Edit +Edit @@ -1685,9 +1689,9 @@

    Procs

    Checks for a channel kind. (Shortcut)   Source -Edit +Edit @@ -1696,20 +1700,20 @@

    Procs

    Empties cache.   Source -Edit +Edit -
    proc `$`(e: Emoji): string {...}{.raises: [], tags: [].}
    +
    proc `$`(e: Emoji): string {...}{.raises: [UnpackError], tags: [].}
      Source -Edit +Edit
    @@ -1718,9 +1722,9 @@

    Procs

      Source -Edit +Edit @@ -1730,9 +1734,9 @@

    Procs

    Creates a Discord Client.   Source -Edit +Edit @@ -1741,9 +1745,9 @@

    Procs

      Source -Edit +Edit @@ -1752,9 +1756,9 @@

    Procs

      Source -Edit +Edit @@ -1763,9 +1767,9 @@

    Procs

      Source -Edit +Edit @@ -1774,9 +1778,9 @@

    Procs

      Source -Edit +Edit @@ -1785,9 +1789,9 @@

    Procs

      Source -Edit +Edit @@ -1796,9 +1800,9 @@

    Procs

      Source -Edit +Edit @@ -1807,9 +1811,9 @@

    Procs

      Source -Edit +Edit @@ -1818,9 +1822,9 @@

    Procs

      Source -Edit +Edit @@ -1830,9 +1834,9 @@

    Procs

      Source -Edit +Edit @@ -1841,9 +1845,9 @@

    Procs

      Source -Edit +Edit @@ -1852,9 +1856,9 @@

    Procs

      Source -Edit +Edit @@ -1863,9 +1867,9 @@

    Procs

      Source -Edit +Edit @@ -1874,9 +1878,9 @@

    Procs

      Source -Edit +Edit @@ -1885,9 +1889,9 @@

    Procs

      Source -Edit +Edit @@ -1896,9 +1900,9 @@

    Procs

      Source -Edit +Edit @@ -1907,9 +1911,9 @@

    Procs

      Source -Edit +Edit @@ -1918,9 +1922,9 @@

    Procs

      Source -Edit +Edit @@ -1930,9 +1934,9 @@

    Procs

      Source -Edit +Edit @@ -1941,9 +1945,9 @@

    Procs

      Source -Edit +Edit @@ -1953,9 +1957,9 @@

    Procs

      Source -Edit +Edit @@ -1965,9 +1969,9 @@

    Procs

      Source -Edit +Edit @@ -1977,9 +1981,9 @@

    Procs

      Source -Edit +Edit @@ -1989,9 +1993,9 @@

    Procs

      Source -Edit +Edit @@ -2000,9 +2004,9 @@

    Procs

      Source -Edit +Edit @@ -2015,7 +2019,7 @@

    Procs

    diff --git a/docs/dimscord/restapi.html b/docs/dimscord/restapi.html index 9fd755e..814f4ed 100644 --- a/docs/dimscord/restapi.html +++ b/docs/dimscord/restapi.html @@ -214,14 +214,14 @@

    dimscord/restapi

    title="getGuildRoles(api: RestApi; guild_id: string): Future[seq[Role]]">getGuildRoles
  • createGuildRole
  • deleteGuildRole
  • editGuildRole
  • + permissions = none PermObj; color = none int; + hoist, mentionable = none bool; reason = ""): Future[Role]">editGuildRole
  • editGuildRolePosition
  • @@ -819,9 +819,10 @@

    Procs

    proc createGuildRole(api: RestApi; guild_id: string; name = "new role";
    -                    hoist, mentionable = false; pobj: PermObj; color = 0; reason = ""): Future[
    -    Role] {...}{.raises: [Exception, ValueError, FutureError],
    -           tags: [TimeEffect, RootEffect, ReadIOEffect, WriteIOEffect].}
    + hoist, mentionable = false; permissions: PermObj; color = 0; + reason = ""): Future[Role] {...}{. + raises: [Exception, ValueError, FutureError], + tags: [TimeEffect, RootEffect, ReadIOEffect, WriteIOEffect].}
    Creates a guild role. @@ -846,8 +847,8 @@

    Procs

    proc editGuildRole(api: RestApi; guild_id, role_id: string; name = none string;
    -                  pobj = none PermObj; color = none int; hoist, mentionable = none bool;
    -                  reason = ""): Future[Role] {...}{.
    +                  permissions = none PermObj; color = none int;
    +                  hoist, mentionable = none bool; reason = ""): Future[Role] {...}{.
         raises: [Exception, ValueError, FutureError],
         tags: [TimeEffect, RootEffect, ReadIOEffect, WriteIOEffect].}
    @@ -1572,7 +1573,7 @@

    Procs

    diff --git a/docs/dimscord/restapi.idx b/docs/dimscord/restapi.idx index 4b93490..4b88e55 100644 --- a/docs/dimscord/restapi.idx +++ b/docs/dimscord/restapi.idx @@ -29,9 +29,9 @@ createGuild dimscord/restapi.html#createGuild,RestApi restapi: createGuild(api: getGuild dimscord/restapi.html#getGuild,RestApi,string restapi: getGuild(api: RestApi; guild_id: string; with_counts = false): Future[Guild] getGuildAuditLogs dimscord/restapi.html#getGuildAuditLogs,RestApi,string,string,string,int restapi: getGuildAuditLogs(api: RestApi; guild_id: string; user_id, before = "";\n action_type = -1; limit = 50): Future[AuditLog] getGuildRoles dimscord/restapi.html#getGuildRoles,RestApi,string restapi: getGuildRoles(api: RestApi; guild_id: string): Future[seq[Role]] -createGuildRole dimscord/restapi.html#createGuildRole,RestApi,string,string,PermObj,int,string restapi: createGuildRole(api: RestApi; guild_id: string; name = "new role";\n hoist, mentionable = false; pobj: PermObj; color = 0; reason = ""): Future[\n Role] +createGuildRole dimscord/restapi.html#createGuildRole,RestApi,string,string,PermObj,int,string restapi: createGuildRole(api: RestApi; guild_id: string; name = "new role";\n hoist, mentionable = false; permissions: PermObj; color = 0; reason = ""): Future[\n Role] deleteGuildRole dimscord/restapi.html#deleteGuildRole,RestApi,string,string restapi: deleteGuildRole(api: RestApi; guild_id, role_id: string): owned(Future[void]) -editGuildRole dimscord/restapi.html#editGuildRole,RestApi,string,string,string restapi: editGuildRole(api: RestApi; guild_id, role_id: string; name = none string;\n pobj = none PermObj; color = none int; hoist, mentionable = none bool;\n reason = ""): Future[Role] +editGuildRole dimscord/restapi.html#editGuildRole,RestApi,string,string,string restapi: editGuildRole(api: RestApi; guild_id, role_id: string; name = none string;\n permissions = none PermObj; color = none int;\n hoist, mentionable = none bool; reason = ""): Future[Role] editGuildRolePosition dimscord/restapi.html#editGuildRolePosition,RestApi,string,string,string restapi: editGuildRolePosition(api: RestApi; guild_id, role_id: string; position = none int;\n reason = ""): Future[seq[Role]] getGuildInvites dimscord/restapi.html#getGuildInvites,RestApi,string restapi: getGuildInvites(api: RestApi; guild_id: string): Future[seq[InviteMetadata]] getGuildVanityUrl dimscord/restapi.html#getGuildVanityUrl,RestApi,string restapi: getGuildVanityUrl(api: RestApi; guild_id: string): Future[\n tuple[code: Option[string], uses: int]] diff --git a/docs/theindex.html b/docs/theindex.html index e59a0ec..10d09e9 100644 --- a/docs/theindex.html +++ b/docs/theindex.html @@ -484,9 +484,9 @@

    Index

    createGuildRole:
    createUserDm: