Anarchy
Search…
Anarchy
Home
Structure
Library structure
Documentation structure
Enum pages
Class pages
Documentation
Clients
Configuration
DiscordClient
DiscordSocketClient
Guilds
Channels
Users
Media sessions
Applications
Subscriptions
Command handling
Powered By
GitBook
DiscordSocketClient
Namespace: Discord.Gateway
Inherits from
DiscordClient
Events
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
Properties
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
Methods
Constructor
Parameters
Name
Description
Type
config
Your desired configuration
DiscordSocketConfig?
Login
Logs the client into the gateway.
Parameters
Name
Description
Type
token
The auth token you wanna log in with
string
Logout
Disconnects from the gateway.
CreateCommandHandler
Creates a command handler for the client.
Parameters
Name
Description
Type
prefix
The prefix you want for commands
string
GetVoiceState
Gets a user's voice state. This method requires caching to be enabled to work.
Parameters
Name
Description
Type
userId
The user's ID
ulong
Returns
DiscordVoiceState
GetGuildVoiceStates
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.
Parameters
Name
Description
Type
guildId
ID of the guild
ulong
Returns
A list of
DiscordVoiceState
GetChannelVoiceStates
Gets all voice states where the user is connected to the channel. This method requires caching to be enabled to work.
Parameters
Name
Description
Type
channelId
ID of the channel
ulong
Returns
A list of
DiscordVoiceState
GetCachedGuilds
Gets all the client's cached guilds.
Returns
A list of
SocketGuild
GetChachedGuild
Gets one of the client's cached guilds.
Parameters
Name
Description
Type
guildId
ID of the guild
ulong
Returns
SocketGuild
GetGuildSettings
Gets the current user's settings for a guild. This method requires caching to be enabled to work.
Parameters
Name
Description
Type
guildId
ID of the guild
ulong
Returns
ClientGuildSettings
GetChannelSettings
Gets the current user's settings for that channel. This method requires caching to be enabled to work.
Parameters
Name
Description
Type
channelId
ID of the channel
ulong
Returns
DiscordChannelSettings
UpdatePresence
Updates the current user's presence.
Parameters
Name
Description
Type
presence
Your new presence
PresenceChange
SetStatus
Updates the current user's status.
Parameters
Name
Description
Type
status
Your new status
UserStatus
SetActivity
Updates the current user's activity.
Parameters
Name
Description
Type
activity
Your new activity. GameActivity and StreamActivity are available if that's what you want to do.
Activity
ChangeVoiceState
Changes the current user's voice channel.
Parameters
Name
Description
Type
state
Your new voice state
VoiceStateChange
JoinVoiceChannel
Joins a voice channel. Anarchy also allows you to join private channel calls.
Parameters
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?
Returns
Broken link
​
Previous
DiscordClient
Next - Documentation
Guilds
Last modified
1yr ago
Copy link
Contents
Inherits from
Events
Properties
Methods
Constructor
Login
Logout
CreateCommandHandler
GetVoiceState
GetGuildVoiceStates
GetChannelVoiceStates
GetCachedGuilds
GetChachedGuild
GetGuildSettings
GetChannelSettings
UpdatePresence
SetStatus
SetActivity
ChangeVoiceState
JoinVoiceChannel