create roles with icons (#2792)
This commit is contained in:
@@ -1084,14 +1084,16 @@ namespace Discord.WebSocket
|
||||
/// <param name="isHoisted">Whether the role is separated from others on the sidebar.</param>
|
||||
/// <param name="isMentionable">Whether the role can be mentioned.</param>
|
||||
/// <param name="options">The options to be used when sending the request.</param>
|
||||
/// <param name="icon">The icon for the role.</param>
|
||||
/// <param name="emoji">The unicode emoji to be used as an icon for the role.</param>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
|
||||
/// <returns>
|
||||
/// A task that represents the asynchronous creation operation. The task result contains the newly created
|
||||
/// role.
|
||||
/// </returns>
|
||||
public Task<RestRole> CreateRoleAsync(string name, GuildPermissions? permissions = default(GuildPermissions?), Color? color = default(Color?),
|
||||
bool isHoisted = false, bool isMentionable = false, RequestOptions options = null)
|
||||
=> GuildHelper.CreateRoleAsync(this, Discord, name, permissions, color, isHoisted, isMentionable, options);
|
||||
bool isHoisted = false, bool isMentionable = false, RequestOptions options = null, Image? icon = null, Emoji emoji = null)
|
||||
=> GuildHelper.CreateRoleAsync(this, Discord, name, permissions, color, isHoisted, isMentionable, options, icon, emoji);
|
||||
internal SocketRole AddRole(RoleModel model)
|
||||
{
|
||||
var role = SocketRole.Create(this, Discord.State, model);
|
||||
@@ -2114,8 +2116,8 @@ namespace Discord.WebSocket
|
||||
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, RequestOptions options)
|
||||
=> await CreateRoleAsync(name, permissions, color, isHoisted, false, options).ConfigureAwait(false);
|
||||
/// <inheritdoc />
|
||||
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, bool isMentionable, RequestOptions options)
|
||||
=> await CreateRoleAsync(name, permissions, color, isHoisted, isMentionable, options).ConfigureAwait(false);
|
||||
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, bool isMentionable, RequestOptions options, Image? icon, Emoji emoji)
|
||||
=> await CreateRoleAsync(name, permissions, color, isHoisted, isMentionable, options, icon, emoji).ConfigureAwait(false);
|
||||
|
||||
/// <inheritdoc />
|
||||
async Task<IReadOnlyCollection<IGuildUser>> IGuild.GetUsersAsync(CacheMode mode, RequestOptions options)
|
||||
|
||||
Reference in New Issue
Block a user