|
@@ -687,14 +687,15 @@ namespace Discord.WebSocket |
|
|
/// <param name="color">The color of the role.</param> |
|
|
/// <param name="color">The color of the role.</param> |
|
|
/// <param name="isHoisted">Whether the role is separated from others on the sidebar.</param> |
|
|
/// <param name="isHoisted">Whether the role is separated from others on the sidebar.</param> |
|
|
/// <param name="options">The options to be used when sending the request.</param> |
|
|
/// <param name="options">The options to be used when sending the request.</param> |
|
|
|
|
|
/// <param name="isMentionable">Whether the role can be mentioned.</param> |
|
|
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <c>null</c>.</exception> |
|
|
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <c>null</c>.</exception> |
|
|
/// <returns> |
|
|
/// <returns> |
|
|
/// A task that represents the asynchronous creation operation. The task result contains the newly created |
|
|
/// A task that represents the asynchronous creation operation. The task result contains the newly created |
|
|
/// role. |
|
|
/// role. |
|
|
/// </returns> |
|
|
/// </returns> |
|
|
public Task<RestRole> CreateRoleAsync(string name, GuildPermissions? permissions = default(GuildPermissions?), Color? color = default(Color?), |
|
|
public Task<RestRole> CreateRoleAsync(string name, GuildPermissions? permissions = default(GuildPermissions?), Color? color = default(Color?), |
|
|
bool isHoisted = false, RequestOptions options = null) |
|
|
|
|
|
=> GuildHelper.CreateRoleAsync(this, Discord, name, permissions, color, isHoisted, options); |
|
|
|
|
|
|
|
|
bool isHoisted = false, RequestOptions options = null, bool isMentionable = false) |
|
|
|
|
|
=> GuildHelper.CreateRoleAsync(this, Discord, name, permissions, color, isHoisted, isMentionable, options); |
|
|
internal SocketRole AddRole(RoleModel model) |
|
|
internal SocketRole AddRole(RoleModel model) |
|
|
{ |
|
|
{ |
|
|
var role = SocketRole.Create(this, Discord.State, model); |
|
|
var role = SocketRole.Create(this, Discord.State, model); |
|
@@ -1150,8 +1151,8 @@ namespace Discord.WebSocket |
|
|
IRole IGuild.GetRole(ulong id) |
|
|
IRole IGuild.GetRole(ulong id) |
|
|
=> GetRole(id); |
|
|
=> GetRole(id); |
|
|
/// <inheritdoc /> |
|
|
/// <inheritdoc /> |
|
|
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, RequestOptions options) |
|
|
|
|
|
=> await CreateRoleAsync(name, permissions, color, isHoisted, options).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, RequestOptions options, bool isMentionable) |
|
|
|
|
|
=> await CreateRoleAsync(name, permissions, color, isHoisted, options, isMentionable).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
/// <inheritdoc /> |
|
|
Task<IReadOnlyCollection<IGuildUser>> IGuild.GetUsersAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IReadOnlyCollection<IGuildUser>> IGuild.GetUsersAsync(CacheMode mode, RequestOptions options) |
|
|