Table of Contents

Method ModifyGuildRoleAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.Rest.dll

ModifyGuildRoleAsync(ulong, ulong, string, DiscordPermissions?, DiscordColor?, bool?, bool?, string, Stream, DiscordEmoji)

Modifies a role

public Task<DiscordRole> ModifyGuildRoleAsync(ulong guildId, ulong roleId, string name, DiscordPermissions? permissions, DiscordColor? color, bool? hoist, bool? mentionable, string reason, Stream icon, DiscordEmoji emoji)

Parameters

guildId ulong

Guild ID

roleId ulong

Role ID

name string

New role name

permissions DiscordPermissions?

New role permissions

color DiscordColor?

New role color

hoist bool?

Whether this role should be hoisted

mentionable bool?

Whether this role should be mentionable

reason string

Why this role was modified

icon Stream

The icon to add to this role

emoji DiscordEmoji

The emoji to add to this role. Must be unicode.

Returns

Task<DiscordRole>

ModifyGuildRoleAsync(ulong, ulong, Action<RoleEditModel>)

Modifies a role

public Task ModifyGuildRoleAsync(ulong roleId, ulong guildId, Action<RoleEditModel> action)

Parameters

roleId ulong

Role ID

guildId ulong

Guild ID

action Action<RoleEditModel>

Modifications

Returns

Task