Pass interaction data into all InteractionBase hooks
This commit is contained in:
parent
01df35b12b
commit
5a520ff567
3 changed files with 21 additions and 16 deletions
|
@ -67,17 +67,17 @@ namespace Geekbot.Core.Interactions
|
|||
InteractionResponse response;
|
||||
try
|
||||
{
|
||||
command.BeforeExecute();
|
||||
command.BeforeExecute(interaction);
|
||||
response = await command.Exec(interaction);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
command.OnException(e);
|
||||
response = command.GetExceptionResponse();
|
||||
command.OnException(interaction, e);
|
||||
response = command.GetExceptionResponse(interaction);
|
||||
}
|
||||
finally
|
||||
{
|
||||
command.AfterExecute();
|
||||
command.AfterExecute(interaction);
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue