Table of Contents

Method CreateGuildRoleAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.Rest.dll

CreateGuildRoleAsync(ulong, string, DiscordPermissions?, int?, bool?, bool?, string, Stream, DiscordEmoji)

Creates a new role

public Task<DiscordRole> CreateGuildRoleAsync(ulong guildId, string name, DiscordPermissions? permissions, int? color, bool? hoist, bool? mentionable, string reason, Stream icon = null, DiscordEmoji emoji = null)

Parameters

guildId ulong

Guild ID

name string

Role name

permissions DiscordPermissions?

Role permissions

color int?

Role color

hoist bool?

Whether this role should be hoisted

mentionable bool?

Whether this role should be mentionable

reason string

Reason why this role was created

icon Stream

The icon to add to this role

emoji DiscordEmoji

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

Returns

Task<DiscordRole>