-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1022 from PaulBraetz/vc-status-moderation
Voice channel status moderation against blocklist patterns
- Loading branch information
Showing
3 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/Modix.Services/Core/Messages/VoiceChannelStatusUpdatedNotification.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
|
||
using Discord.WebSocket; | ||
|
||
namespace Discord | ||
{ | ||
/// <summary> | ||
/// Describes an application-wide notification that occurs when <see cref="IBaseSocketClient.VoiceChannelStatusUpdated"/> is raised. | ||
/// </summary> | ||
public class VoiceChannelStatusUpdatedNotification | ||
{ | ||
/// <summary> | ||
/// Constructs a new <see cref="VoiceChannelStatusUpdatedNotification"/> from the given values. | ||
/// </summary> | ||
/// <param name="channel">The value to use for <see cref="Channel"/>.</param> | ||
/// <param name="oldStatus">The value to use for <see cref="OldStatus"/>.</param> | ||
/// <param name="newStatus">The value to use for <see cref="NewStatus"/>.</param> | ||
/// <exception cref="ArgumentNullException">Throws for <paramref name="oldStatus"/>.</exception> | ||
/// <exception cref="ArgumentNullException">Throws for <paramref name="newStatus"/>.</exception> | ||
public VoiceChannelStatusUpdatedNotification(Cacheable<SocketVoiceChannel, ulong> channel, string oldStatus, string newStatus) | ||
{ | ||
ArgumentNullException.ThrowIfNull(oldStatus); | ||
ArgumentNullException.ThrowIfNull(newStatus); | ||
|
||
Channel = channel; | ||
OldStatus = oldStatus; | ||
NewStatus = newStatus; | ||
} | ||
/// <summary> | ||
/// The voice channel whose status was updated. | ||
/// </summary> | ||
public Cacheable<SocketVoiceChannel, ulong> Channel { get; } | ||
/// <summary> | ||
/// The old voice channel status. | ||
/// </summary> | ||
public string OldStatus { get; } | ||
/// <summary> | ||
/// The new voice channel status. | ||
/// </summary> | ||
public string NewStatus { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters