-
Notifications
You must be signed in to change notification settings - Fork 32
Changing Client Account Information
DiscordSharp allows you to change various aspects of your account's information via the API.
First, you must get an instance of your client's DiscordUserInformation like this.
DiscordUserInformation userInfo = client.ClientPrivateInformation.Copy();
Second, just change the username value to what you want the new username to be
newUserInfo.username = "clever bot name here"
Finally, pass it into the client.ChangeBotInformation method.
client.ChangeBotInformation(newUserInfo);
Email updating is currently not tested, password updating works now, just change the DiscordUserInformation.password
field and the client will know and change this!
(special thanks to Voltana, Discord.Net developer for helping me with this)
Assuming you already have a Bitmap
loaded into memory, you can just pass this Bitmap
into the client.ChangeBotPicture method.
client.ChangeBotPicture(newBotImage);
DiscordSharp handles all necessary conversion for you, so long as you pass in a Bitmap
image.
Should you want to pass in an Image
(System.Drawing.Image), you can use the Bitmap class to perform the necessary conversions.
client.ChangeBotPicture(new Bitmap(newBotImageAsImage));