Method ModifyCurrentUsersNickname
| Improve this Doc View SourceModifyCurrentUsersNickname(Snowflake, string?)
Modifies the current bot's nickname in the specified guild.
Requires ChangeNickname.
Declaration
public Task<string?> ModifyCurrentUsersNickname(Snowflake guildId, string? nickname)
Parameters
| Type | Name | Description |
|---|---|---|
| Snowflake | guildId | |
| string | nickname | The new nickname (or null or an empty string to remove nickname). |
Returns
| Type | Description |
|---|---|
| Task<string> | Returns the new nickname (or null if the nickname was removed). |
Exceptions
| Type | Condition |
|---|---|
| DiscordHttpApiException |
ModifyCurrentUsersNickname(DiscordGuild, string?)
Modifies the current bot's nickname in the specified guild.
Requires ChangeNickname.
Declaration
public Task<string?> ModifyCurrentUsersNickname(DiscordGuild guild, string? nickname)
Parameters
| Type | Name | Description |
|---|---|---|
| DiscordGuild | guild | |
| string | nickname | The new nickname (or null or an empty string to remove nickname). |
Returns
| Type | Description |
|---|---|
| Task<string> | Returns the new nickname (or null if the nickname was removed). |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | |
| DiscordHttpApiException |