dimscord

    Dark Mode
Search:
Group by:

Welcome to the Dimscord Documentation!

  • If you have any errors like for example getGuildChannel doesn't exist in v1.0.0, then you can just simply do nimble install dimscord@#head if this does not work then uninstall the version you were using, or you could replace the folder from the .nimble/pkgs directory.

You can search for symbols by going to https://krisppurg.github.io/dimscord/theindex.html.

Reference

  • objects Includes the discord objects, such as Message, Guild, User, Shard, etc.
  • gateway Allows you to connect, disconnect, send gateway messages to the gateway. Like updating your status with updateStatus, requesting guild members with requestGuildMembers, joining/moving/leaving a voice channel with voiceStateUpdate.

    Please note that if you are compiling with ARC or ORC, use --deepCopy.

  • restapi Interfaces with Discord's REST API, as this file would handle ratelimits if you receive lots of 403s or 429s, I'd recommend either stopping your bot or at least check your code like if the bot has the permissions to do this and that, for 429s the lib would at least try to re-send the request, the common ways to get 429s is reactions and you may get 429s, though this is more common in other libraries, if you were to add more reactions, I'd recommend adding some sort of cooldowns to it. (OAuth2 support will be added)
  • helpers Includes helper methods such as mentioning a user @ify channels, users, roles, etc, this includes iconUrls too.
  • constants Say if you were to check what verification level is the guild you can use the constants like vlHigh, vlLow, vlVeryHigh, vlMedium, this file includes permission enums like permAddReactions, permViewAuditLogs, permCreateInstantInvite, etc. Intents are also included there. If any of these types are enums and you want to compare them like for example ActivityFlags use cast[int]({myEnum}) e.g. cast[int]({afSync})
  • voice Allows you to connect to the voice gateway (Sending audio is postponed),
    handle voice gateway, etc.

    For joining/leaving a voice channel, see gateway.

    Keep in mind that:
    When you join a channel Shard.voiceConnections will store the guild_id, and the VoiceClient information such as the endpoint and channel_id for example. With VoiceClient you can connect to the voice client gateway so you can play audio on on_ready.

    For further details about voice click dimscord/voice.

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.

  • asyncdispatch This one is needed.
  • options Optional parameters, e.g. mute = some true.
  • base64 Icons such as Guild icons or emoji image.
  • json Raw data handling (on_dispatch)

Definable options

  • -d:dimscordDebug For debugging rest, gateway and voice.
  • -d:discordCompress For zlib compression a zlib1 file needs to be in your folder.
  • -d:discordv8 Discord API v8 if v6 or v7 is no longer function consider defining it.

Exports

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