Property | Type | Description | |
---|---|---|---|
GetLastVoiceClientLogger | Logger |
Method | Description | |
---|---|---|
AcceptInvite ( string inviteID ) : void |
(Client account only) accepts an invite to a server.
|
|
AssignRoleToMember ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordRole role, DiscordSharp.DiscordMember member ) : void |
Assigns a specified role to a member, given you have the permission.
|
|
AssignRoleToMember ( DiscordSharp.DiscordServer guild, List |
Assigns the specified roles to a member, given you have the permission.
|
|
AttachFile ( DiscordSharp.DiscordChannel channel, string message, System stream ) : void |
Sends a file to the specified DiscordChannel with the given message.
|
|
AttachFile ( DiscordSharp.DiscordChannel channel, string message, string pathToFile ) : void |
Sends a file to the specified DiscordChannel with the given message.
|
|
BanMember ( DiscordSharp.DiscordMember member, DiscordSharp.DiscordServer serverOverride, int days ) : DiscordSharp.DiscordMember |
Bans a specified DiscordMember from the guild that's assumed from their parent property.
|
|
BanMember ( DiscordSharp.DiscordMember member, int days ) : DiscordSharp.DiscordMember |
Bans a specified DiscordMember from the guild that's assumed from their parent property.
|
|
ChangeChannelTopic ( string Channeltopic, DiscordSharp.DiscordChannel channel ) : void |
Changes the channel topic assosciated with the Discord text channel.
|
|
ChangeClientAvatar ( |
Changes the current client's avatar. Any high resolution pictures are automatically downscaled and Discord will perform jpeg compression on them.
|
|
ChangeClientInformation ( DiscordSharp.DiscordUserInformation info ) : void |
Used for changing the client's email, password, username, etc.
|
|
ChangeGuildIcon ( |
Changes the icon assosciated with the guild. Discord will perform jpeg compression and this image is automatically downscaled.
|
|
ClearInternalMessageLog ( ) : int |
Clears the internal message log cache
|
|
ClearOfflineUsersFromServer ( DiscordSharp.DiscordServer server ) : int |
Iterates through a server's members and removes offline users.
|
|
Connect ( bool useDotNetWebsocket = false ) : void |
Runs the websocket connection for the client hooking up the appropriate events.
|
|
ConnectToVoiceChannel ( DiscordSharp.DiscordChannel channel, DiscordSharp.DiscordVoiceConfig voiceConfig = null, bool clientMuted = false, bool clientDeaf = false ) : void |
Connects to a given voice channel.
|
|
ConnectedToVoice ( ) : bool |
|
|
CreateChannel ( DiscordSharp.DiscordServer server, string ChannelName, bool voice ) : DiscordSharp.DiscordChannel |
Creates either a text or voice channel in a DiscordServer given a name. Given you have the permission of course.
|
|
CreateGuild ( string GuildName ) : DiscordSharp.DiscordServer |
Creates an empty guild with only this client in it given the following name. Unknown if works on bot accounts or not.
|
|
CreateInvite ( DiscordSharp.DiscordChannel channel ) : string |
Creates and invite to the given channel.
|
|
CreateRole ( DiscordSharp.DiscordServer guild ) : DiscordSharp.DiscordRole |
Creates a default role in the specified guild.
|
|
DeleteAllMessages ( ) : int |
Deletes all messages made by the bot since running.
|
|
DeleteChannel ( DiscordSharp.DiscordChannel channel ) : void |
Deletes a specified Discord channel given you have the permission.
|
|
DeleteInvite ( string id ) : void |
Deletes an invite by id
|
|
DeleteMessage ( DiscordSharp.DiscordMessage message ) : void |
Deletes a specified DiscordMessage.
|
|
DeleteMessage ( string id ) : void |
Deletes a message with a specified ID. This method will only work if the message was sent since the bot has ran.
|
|
DeleteMultipleMessagesInChannel ( DiscordSharp.DiscordChannel channel, int count ) : int |
Deletes the specified number of messages in a given channel. Thank you to Siegen for this idea/method!
|
|
DeleteRole ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordRole role ) : void |
Deletes a specified role.
|
|
DeleteServer ( DiscordSharp.DiscordServer server ) : void |
(Owner only, non-bot only) Sends an http DELETE request to delete the server you specify.
|
|
DeleteServer ( string ServerID ) : void |
(Owner only, non-bot only) Sends an http DELETE request to delete the server you specify by ID.
|
|
DisconnectFromVoice ( ) : void |
Also disposes
|
|
DiscordClient ( string tokenOverride = null, bool isBotAccount = false, bool enableLogging = true ) : System |
|
|
Dispose ( ) : void |
Disposes.
|
|
EchoPacket ( DiscordSharp.DiscordAudioPacket packet ) : void |
Echoes a received audio packet back.
|
|
EditGuildName ( DiscordSharp.DiscordServer guild, string NewGuildName ) : void |
Edits the name of the guild, given you have the permission.
|
|
EditMessage ( string MessageID, string replacementMessage, DiscordSharp.DiscordChannel channel ) : DiscordSharp.DiscordMessage |
If you screwed up, you can use this method to edit a given message. This sends out an http patch request with a replacement message
|
|
EditRole ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordRole newRole ) : DiscordSharp.DiscordRole |
Edits a role with the new role information.
|
|
GetBans ( DiscordSharp.DiscordServer server ) : List |
Retrieves a DiscordMember List of members banned in the specified server.
|
|
GetChannelByID ( long id ) : DiscordSharp.DiscordChannel |
|
|
GetChannelByName ( string channelName ) : DiscordSharp.DiscordChannel |
you probably shouldn't use this.
|
|
GetLastMessageSent ( ) : DiscordSharp.DiscordMessage |
|
|
GetLastMessageSent ( DiscordSharp.DiscordChannel inChannel ) : DiscordSharp.DiscordMessage |
|
|
GetMemberFromChannel ( DiscordChannelBase channel, string id ) : DiscordSharp.DiscordMember |
|
|
GetMemberFromChannel ( DiscordChannelBase channel, string username, bool caseSensitive ) : DiscordSharp.DiscordMember |
|
|
GetMessageHistory ( DiscordChannelBase channel, int count, string idBefore = "", string idAfter = "" ) : List |
Returns a List of DiscordMessages.
|
|
GetMessageLog ( ) : DiscordMessage>.Dictionary |
Any messages logged since connection to the websocket.
|
|
GetPrivateChannels ( ) : List |
Private channels assosciated with the account.
|
|
GetServerChannelIsIn ( DiscordSharp.DiscordChannel channel ) : DiscordSharp.DiscordServer |
|
|
GetServersList ( ) : List |
Current DiscordServers you're connected to.
|
|
GetVoiceClient ( ) : DiscordSharp.DiscordVoiceClient |
|
|
KickMember ( DiscordSharp.DiscordMember member ) : void |
Kicks a specified DiscordMember from the guild that's assumed from their parent property.
|
|
LeaveServer ( DiscordSharp.DiscordServer server ) : void |
Sends an http DELETE request to leave the server you send in this parameter.
|
|
LeaveServer ( string ServerID ) : void |
(Owner only, non-bot only) Sends an http DELETE request to delete the server you specify.
|
|
Logout ( ) : void |
Logs out of Discord and then disposes.
|
|
MakeInviteURLFromCode ( string id ) : string |
Just prepends https://discord.gg/ to a given invite :)
|
|
RemoveBan ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordMember member ) : void |
Removes a ban on the user.
|
|
RemoveBan ( DiscordSharp.DiscordServer guild, string userID ) : void |
Removes a ban on the user.
|
|
SendLoginRequest ( ) : string |
Sends a login request.
|
|
SendMessageToChannel ( string message, DiscordSharp.DiscordChannel channel ) : DiscordSharp.DiscordMessage |
Sends a message to a channel, what else did you expect?
|
|
SendMessageToUser ( string message, DiscordSharp.DiscordMember member ) : DiscordSharp.DiscordMessage |
Sends a private message to the given user.
|
|
UpdateBotStatus ( bool idle ) : void |
Updates the bot's status.
|
|
UpdateCurrentGame ( string gameName, bool streaming, string url = null ) : void |
Updates the bot's 'Currently playing' status to the following text. Pass in null if you want to remove this.
|
Method | Description | |
---|---|---|
BeginHeartbeatTask ( ) : void | ||
ChangeClientUsername ( string newUsername ) : void | ||
ChannelCreateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
ChannelDeleteEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
ChannelUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
ClientPacketReceived ( Newtonsoft.Json.Linq.JObject message ) : void | ||
ConnectToVoiceAsync ( ) : Task | ||
ConnectToVoiceAsync ( ) : void | ||
FindInMessageLog ( System.String id ) : DiscordSharp.DiscordMessage | ||
GetChannelsList ( Newtonsoft.Json.Linq.JObject m ) : void | ||
GetDiscordChannelByID ( string id ) : DiscordSharp.DiscordChannel | ||
GetGatewayUrl ( ) : string | ||
GuildCreateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildDeleteEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildMemberAddEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildMemberBanRemovedEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildMemberBannedEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildMemberChunkEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildMemberRemoveEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildMemberUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildRoleDeleteEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildRoleUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
GuildUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
KeepAlive ( ) : void | ||
MessageCreateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
MessageDeletedEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
MessageUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
MiscellaneousOpcodes ( Newtonsoft.Json.Linq.JObject message ) : void | ||
PerformReconnection ( ) : void | ||
PresenceUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
SendActualMessage ( string id, string message, DiscordSharp.DiscordMember recipient ) : DiscordSharp.DiscordMessage | ||
SendDeleteRequest ( DiscordSharp.DiscordMessage message ) : void | ||
SendIdentifyPacket ( ) : void | ||
ServerInfo ( string channelOrServerId ) : Newtonsoft.Json.Linq.JObject | ||
UserUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
VoiceServerUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void | ||
VoiceStateUpdateEvents ( Newtonsoft.Json.Linq.JObject message ) : void |
public AcceptInvite ( string inviteID ) : void | ||
inviteID | string | The ID of the invite you want to accept. This is NOT the full URL of the invite |
return | void |
public AssignRoleToMember ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordRole role, DiscordSharp.DiscordMember member ) : void | ||
guild | DiscordSharp.DiscordServer | The guild you and the user are in. |
role | DiscordSharp.DiscordRole | The role you wish to assign them. |
member | DiscordSharp.DiscordMember | The member you wish to assign the role to. |
return | void |
public AssignRoleToMember ( DiscordSharp.DiscordServer guild, List |
||
guild | DiscordSharp.DiscordServer | The guild you and the user are in. |
roles | List |
The roles you wish to assign them. |
member | DiscordSharp.DiscordMember | The member you wish to assign the role to. |
return | void |
public AttachFile ( DiscordSharp.DiscordChannel channel, string message, System stream ) : void | ||
channel | DiscordSharp.DiscordChannel | The channel to send the message to. |
message | string | The message you want the file to have with it. |
stream | System | A stream object to send the bytes from. |
return | void |
public AttachFile ( DiscordSharp.DiscordChannel channel, string message, string pathToFile ) : void | ||
channel | DiscordSharp.DiscordChannel | The channel to send the message to. |
message | string | The message you want the file to have with it. |
pathToFile | string | The path to the file you wish to send (be careful!) |
return | void |
public BanMember ( DiscordSharp.DiscordMember member, DiscordSharp.DiscordServer serverOverride, int days ) : DiscordSharp.DiscordMember | ||
member | DiscordSharp.DiscordMember | |
serverOverride | DiscordSharp.DiscordServer | |
days | int | |
return | DiscordSharp.DiscordMember |
public BanMember ( DiscordSharp.DiscordMember member, int days ) : DiscordSharp.DiscordMember | ||
member | DiscordSharp.DiscordMember | |
days | int | The number of days the user should be banned for, or 0 for infinite. |
return | DiscordSharp.DiscordMember |
public ChangeChannelTopic ( string Channeltopic, DiscordSharp.DiscordChannel channel ) : void | ||
Channeltopic | string | The new channel topic. |
channel | DiscordSharp.DiscordChannel | The channel you wish to change the topic for. |
return | void |
public ChangeClientAvatar ( |
||
image | The Bitmap object assosciated with the avatar you wish to upload. | |
return | void |
public ChangeClientInformation ( DiscordSharp.DiscordUserInformation info ) : void | ||
info | DiscordSharp.DiscordUserInformation | |
return | void |
public ChangeGuildIcon ( |
||
image | The bitmap object associated | |
guild | DiscordSharp.DiscordServer | The guild of the icon you wish to change. |
return | void |
public ClearOfflineUsersFromServer ( DiscordSharp.DiscordServer server ) : int | ||
server | DiscordSharp.DiscordServer | |
return | int |
public Connect ( bool useDotNetWebsocket = false ) : void | ||
useDotNetWebsocket | bool | If true, DiscordSharp will connect using the .Net Framework's built-in WebSocketClasses. /// Please do not use this on Mono or versions of Windows below 8/8.1 |
return | void |
public ConnectToVoiceChannel ( DiscordSharp.DiscordChannel channel, DiscordSharp.DiscordVoiceConfig voiceConfig = null, bool clientMuted = false, bool clientDeaf = false ) : void | ||
channel | DiscordSharp.DiscordChannel | The channel to connect to. |
voiceConfig | DiscordSharp.DiscordVoiceConfig | The voice configuration to use. If null, default values will be used. |
clientMuted | bool | Whether or not the client will connect muted. Defaults to false. |
clientDeaf | bool | Whether or not the client will connect deaf. Defaults to false. |
return | void |
public CreateChannel ( DiscordSharp.DiscordServer server, string ChannelName, bool voice ) : DiscordSharp.DiscordChannel | ||
server | DiscordSharp.DiscordServer | The server to create the channel in. |
ChannelName | string | The name of the channel (will automatically be lowercased if text) |
voice | bool | True if you want the channel to be a voice channel. |
return | DiscordSharp.DiscordChannel |
public CreateGuild ( string GuildName ) : DiscordSharp.DiscordServer | ||
GuildName | string | The name of the guild you wish to create. |
return | DiscordSharp.DiscordServer |
public CreateInvite ( DiscordSharp.DiscordChannel channel ) : string | ||
channel | DiscordSharp.DiscordChannel | |
return | string |
public CreateRole ( DiscordSharp.DiscordServer guild ) : DiscordSharp.DiscordRole | ||
guild | DiscordSharp.DiscordServer | The guild to make the role in. |
return | DiscordSharp.DiscordRole |
public DeleteChannel ( DiscordSharp.DiscordChannel channel ) : void | ||
channel | DiscordSharp.DiscordChannel | The DiscordChannel object to delete |
return | void |
public DeleteInvite ( string id ) : void | ||
id | string | The ID of the invite you wish to delete. |
return | void |
public DeleteMessage ( DiscordSharp.DiscordMessage message ) : void | ||
message | DiscordSharp.DiscordMessage | |
return | void |
public DeleteMultipleMessagesInChannel ( DiscordSharp.DiscordChannel channel, int count ) : int | ||
channel | DiscordSharp.DiscordChannel | The channel to delete messages in. |
count | int | The amount of messages to delete (max 100) |
return | int |
public DeleteRole ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordRole role ) : void | ||
guild | DiscordSharp.DiscordServer | The guild the role is in. |
role | DiscordSharp.DiscordRole | The role to delete. |
return | void |
public DeleteServer ( DiscordSharp.DiscordServer server ) : void | ||
server | DiscordSharp.DiscordServer | The DiscordServer object you want to delete. |
return | void |
public DeleteServer ( string ServerID ) : void | ||
ServerID | string | The server's ID you want to delete. |
return | void |
public DiscordClient ( string tokenOverride = null, bool isBotAccount = false, bool enableLogging = true ) : System | ||
tokenOverride | string | If you have a token you wish to use, provide it here. Else, a login attempt will be made. |
isBotAccount | bool | Set this to true if your bot is going to be a bot account |
enableLogging | bool | |
return | System |
public EchoPacket ( DiscordSharp.DiscordAudioPacket packet ) : void | ||
packet | DiscordSharp.DiscordAudioPacket | |
return | void |
public EditGuildName ( DiscordSharp.DiscordServer guild, string NewGuildName ) : void | ||
guild | DiscordSharp.DiscordServer | The guild's name you wish to edit. |
NewGuildName | string | The new guild name. |
return | void |
public EditMessage ( string MessageID, string replacementMessage, DiscordSharp.DiscordChannel channel ) : DiscordSharp.DiscordMessage | ||
MessageID | string | The ID of the message you want to edit. |
replacementMessage | string | What you want the text to be edited to. |
channel | DiscordSharp.DiscordChannel | The channel the message is in |
return | DiscordSharp.DiscordMessage |
public EditRole ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordRole newRole ) : DiscordSharp.DiscordRole | ||
guild | DiscordSharp.DiscordServer | The guild the role is in. |
newRole | DiscordSharp.DiscordRole | the new role. |
return | DiscordSharp.DiscordRole |
public GetBans ( DiscordSharp.DiscordServer server ) : List |
||
server | DiscordSharp.DiscordServer | |
return | List |
public GetChannelByID ( long id ) : DiscordSharp.DiscordChannel | ||
id | long | |
return | DiscordSharp.DiscordChannel |
public GetChannelByName ( string channelName ) : DiscordSharp.DiscordChannel | ||
channelName | string | |
return | DiscordSharp.DiscordChannel |
public GetLastMessageSent ( ) : DiscordSharp.DiscordMessage | ||
return | DiscordSharp.DiscordMessage |
public GetLastMessageSent ( DiscordSharp.DiscordChannel inChannel ) : DiscordSharp.DiscordMessage | ||
inChannel | DiscordSharp.DiscordChannel | |
return | DiscordSharp.DiscordMessage |
public GetMemberFromChannel ( DiscordChannelBase channel, string id ) : DiscordSharp.DiscordMember | ||
channel | DiscordChannelBase | |
id | string | |
return | DiscordSharp.DiscordMember |
public GetMemberFromChannel ( DiscordChannelBase channel, string username, bool caseSensitive ) : DiscordSharp.DiscordMember | ||
channel | DiscordChannelBase | |
username | string | |
caseSensitive | bool | |
return | DiscordSharp.DiscordMember |
public GetMessageHistory ( DiscordChannelBase channel, int count, string idBefore = "", string idAfter = "" ) : List |
||
channel | DiscordChannelBase | The channel to return them from. |
count | int | How many to return |
idBefore | string | Messages before this message ID. |
idAfter | string | Messages after this message ID. |
return | List |
public GetMessageLog ( ) : DiscordMessage>.Dictionary |
||
return | DiscordMessage>.Dictionary |
public GetServerChannelIsIn ( DiscordSharp.DiscordChannel channel ) : DiscordSharp.DiscordServer | ||
channel | DiscordSharp.DiscordChannel | |
return | DiscordSharp.DiscordServer |
public GetVoiceClient ( ) : DiscordSharp.DiscordVoiceClient | ||
return | DiscordSharp.DiscordVoiceClient |
public KickMember ( DiscordSharp.DiscordMember member ) : void | ||
member | DiscordSharp.DiscordMember | |
return | void |
public LeaveServer ( DiscordSharp.DiscordServer server ) : void | ||
server | DiscordSharp.DiscordServer | The DiscordServer object you want to leave. |
return | void |
public LeaveServer ( string ServerID ) : void | ||
ServerID | string | The server's ID you want to delete. |
return | void |
public MakeInviteURLFromCode ( string id ) : string | ||
id | string | |
return | string |
public RemoveBan ( DiscordSharp.DiscordServer guild, DiscordSharp.DiscordMember member ) : void | ||
guild | DiscordSharp.DiscordServer | The guild to lift the ban from. |
member | DiscordSharp.DiscordMember | The DiscordMember object of the user to lift the ban from, assuming you have it. |
return | void |
public RemoveBan ( DiscordSharp.DiscordServer guild, string userID ) : void | ||
guild | DiscordSharp.DiscordServer | The guild to lift the ban from. |
userID | string | The ID of the user to lift the ban. |
return | void |
public SendMessageToChannel ( string message, DiscordSharp.DiscordChannel channel ) : DiscordSharp.DiscordMessage | ||
message | string | The text to send |
channel | DiscordSharp.DiscordChannel | DiscordChannel object to send the message to. |
return | DiscordSharp.DiscordMessage |
public SendMessageToUser ( string message, DiscordSharp.DiscordMember member ) : DiscordSharp.DiscordMessage | ||
message | string | The message text to send them. |
member | DiscordSharp.DiscordMember | The member you want to send this to. |
return | DiscordSharp.DiscordMessage |
public UpdateBotStatus ( bool idle ) : void | ||
idle | bool | True if you want the bot to report as idle. |
return | void |
public UpdateCurrentGame ( string gameName, bool streaming, string url = null ) : void | ||
gameName | string | The game's name. Old gameid lookup can be seen at: http://hastebin.com/azijiyaboc.json/ |
streaming | bool | Whether or not you want your bot to appear as if it is streaming. True means it will show it's streaming. |
url | string | The 'url' for the stream, if your bot is streaming. |
return | void |