DiscordSocketClient
Last updated
Last updated
Namespace: Discord.Gateway
Note: All event names here have had the 'On' at the start of them removed.
Name
Description
LoggedIn
When the client has connected and authenticated to the gateway
LoggedOut
When the client gets disconnected from the gateway
SettingsUpdated
When the client's current user's settings get updated
SessionsUpdated
When a client logs into/out of the current user
UserUpdated
When a user relevant to the client's user gets updated
JoinedGuild
When the client joins/creates a guild
GuildUpdated
When a guild gets updated
LeftGuild
When the client leaves/gets removed from a guild
UserJoinedGuild
When a user joins a guild
UserLeftGuild
When a user leaves a guild
GuildMemberUpdated
When a guild's member gets updated
UserPresenceUpdated
When a user's presence (aka their activities and status) get updated
RoleCreated
When a new role is created
RoleUpdated
When a role is updated
RoleDeleted
When a role is deleted
ChannelCreated
When a new channel is created
ChannelUpdated
When a channel gets updated
ChannelDeleted
When a channel gets deleted
Ringing
When the current user or another user have started a call
CallUpdated
When a call gets updated
CallEnded
When a call ends
InviteCreated
When a new invite is created
InviteDeleted
When an invite is deleted
VoiceStateUpdate
When a user's voice state updates
EmojisUpdated
When a guild's emojis get updated
UserTyping
When a user triggers the 'user is typing...' signal
MessageReceived
When a new message is received
MessageEdited
When a message gets edited
MessageDeleted
When a message gets deleted
MessageReactionAdded
When a reaction gets added to a message
MessageReactionRemoved
When a reaction gets removed from a message
UserBanned
When a user gets banned from a guild
UserUnbanned
When a user gets unbanned from a guild
RelationshipAdded
When a new relationship is created
RelationshipRemoved
When a relationship is removed
GiftCodeCreated
When the client generates a code for one of it's gifts
GiftUpdated
Triggered when a gift you've interacted with in a channel gets updated. The .Json member is available, because there's uncertainty of what can be updated. If you find any other than "uses", please create an issue.
OnBoostSlotCreated
When a boost slot is created
OnBoostSlotUpdated
When a boost slot is updated (e.g. it's being used on a guild)
OnEntitlementCreated
Entitlements have something to do with gifts, but research is incomplete
OnEntitlementUpdated
When an entitlement is updated
Name
Description
Type
UserSettings
The current user's settings
DiscordUserSettings
CommandHandler
The client's command handler
CommandHandler
Config
The client's configuration
LockedDiscordSocketConfig
LoggedIn
Indicates if the client is connected to the gateway
bool
SessionId
The client's current gateway session ID
string
State
The connection state
GatewayConnectionState
Name
Description
Type
config
Your desired configuration
DiscordSocketConfig?
Logs the client into the gateway.
Name
Description
Type
token
The auth token you wanna log in with
string
Disconnects from the gateway.
Creates a command handler for the client.
Name
Description
Type
prefix
The prefix you want for commands
string
Gets a user's voice state. This method requires caching to be enabled to work.
Name
Description
Type
userId
The user's ID
ulong
Gets all voice states where the user is connected to a voice channel within the guild. This method requires caching to be enabled to work.
Name
Description
Type
guildId
ID of the guild
ulong
A list of
Gets all voice states where the user is connected to the channel. This method requires caching to be enabled to work.
Name
Description
Type
channelId
ID of the channel
ulong
A list of
Gets all the client's cached guilds.
A list of
Gets one of the client's cached guilds.
Name
Description
Type
guildId
ID of the guild
ulong
Gets the current user's settings for a guild. This method requires caching to be enabled to work.
Name
Description
Type
guildId
ID of the guild
ulong
Gets the current user's settings for that channel. This method requires caching to be enabled to work.
Name
Description
Type
channelId
ID of the channel
ulong
Updates the current user's presence.
Name
Description
Type
presence
Your new presence
PresenceChange
Updates the current user's status.
Name
Description
Type
status
Your new status
UserStatus
Updates the current user's activity.
Name
Description
Type
activity
Your new activity. GameActivity and StreamActivity are available if that's what you want to do.
Activity
Changes the current user's voice channel.
Name
Description
Type
state
Your new voice state
VoiceStateChange
Joins a voice channel. Anarchy also allows you to join private channel calls.
Name
Description
Type
guildId
If you want to join a guild's voice channel, put that here. Otherwise leave as null
ulong?
channelId
The channel you want to join
ulong
muted
Whether or not you want to mute yourself
bool?
deafened
Whether or not you want to deafen yourself
bool?