|
|
@@ -31,7 +31,7 @@ namespace Discord.WebSocket |
|
|
|
public override bool IsWebhook => true; |
|
|
|
/// <inheritdoc /> |
|
|
|
internal override SocketPresence Presence { get { return new SocketPresence(UserStatus.Offline, null, null, null); } set { } } |
|
|
|
internal override SocketGlobalUser GlobalUser => |
|
|
|
internal override SocketGlobalUser GlobalUser => |
|
|
|
throw new NotSupportedException(); |
|
|
|
|
|
|
|
internal SocketWebhookUser(SocketGuild guild, ulong id, ulong webhookId) |
|
|
@@ -73,32 +73,52 @@ namespace Discord.WebSocket |
|
|
|
ChannelPermissions IGuildUser.GetPermissions(IGuildChannel channel) => Permissions.ToChannelPerms(channel, GuildPermissions.Webhook.RawValue); |
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Webhook users cannot be kicked.</exception> |
|
|
|
Task IGuildUser.KickAsync(string reason, RequestOptions options) => |
|
|
|
Task IGuildUser.KickAsync(string reason, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Webhook users cannot be kicked."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Webhook users cannot be modified.</exception> |
|
|
|
Task IGuildUser.ModifyAsync(Action<GuildUserProperties> func, RequestOptions options) => |
|
|
|
Task IGuildUser.ModifyAsync(Action<GuildUserProperties> func, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Webhook users cannot be modified."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.AddRoleAsync(IRole role, RequestOptions options) => |
|
|
|
Task IGuildUser.AddRoleAsync(ulong roleId, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.AddRolesAsync(IEnumerable<IRole> roles, RequestOptions options) => |
|
|
|
Task IGuildUser.AddRoleAsync(IRole role, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.RemoveRoleAsync(IRole role, RequestOptions options) => |
|
|
|
Task IGuildUser.AddRolesAsync(IEnumerable<ulong> roleIds, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.RemoveRolesAsync(IEnumerable<IRole> roles, RequestOptions options) => |
|
|
|
Task IGuildUser.AddRolesAsync(IEnumerable<IRole> roles, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.RemoveRoleAsync(ulong roleId, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.RemoveRoleAsync(IRole role, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.RemoveRolesAsync(IEnumerable<ulong> roles, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
/// <exception cref="NotSupportedException">Roles are not supported on webhook users.</exception> |
|
|
|
Task IGuildUser.RemoveRolesAsync(IEnumerable<IRole> roles, RequestOptions options) => |
|
|
|
throw new NotSupportedException("Roles are not supported on webhook users."); |
|
|
|
|
|
|
|
//IVoiceState |
|
|
|