|
|
@@ -24,6 +24,29 @@ namespace Discord.Interactions |
|
|
|
public event Func<LogMessage, Task> Log { add { _logEvent.Add(value); } remove { _logEvent.Remove(value); } } |
|
|
|
internal readonly AsyncEvent<Func<LogMessage, Task>> _logEvent = new (); |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Occurs when any type of interaction is executed. |
|
|
|
/// </summary> |
|
|
|
public event Func<ICommandInfo, IInteractionContext, IResult, Task> InteractionExecuted |
|
|
|
{ |
|
|
|
add |
|
|
|
{ |
|
|
|
SlashCommandExecuted += value; |
|
|
|
ContextCommandExecuted += value; |
|
|
|
ComponentCommandExecuted += value; |
|
|
|
AutocompleteCommandExecuted += value; |
|
|
|
ModalCommandExecuted += value; |
|
|
|
} |
|
|
|
remove |
|
|
|
{ |
|
|
|
SlashCommandExecuted -= value; |
|
|
|
ContextCommandExecuted -= value; |
|
|
|
ComponentCommandExecuted -= value; |
|
|
|
AutocompleteCommandExecuted -= value; |
|
|
|
ModalCommandExecuted -= value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Occurs when a Slash Command is executed. |
|
|
|
/// </summary> |
|
|
|