Pass entire Interaction object to interaction commands, instead of just the data
This commit is contained in:
parent
aaea8d0540
commit
d17ca4c556
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ namespace Geekbot.Core.Interactions
|
|||
}
|
||||
|
||||
public abstract Command GetCommandInfo();
|
||||
public abstract Task<InteractionResponse> Exec(InteractionData interaction);
|
||||
public abstract Task<InteractionResponse> Exec(Interaction interaction);
|
||||
|
||||
void IInteractionBase.BeforeExecute() => this.BeforeExecute();
|
||||
void IInteractionBase.AfterExecute() => this.AfterExecute();
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Geekbot.Core.Interactions
|
|||
var type = _commands[interaction.Data.Name];
|
||||
var command = (InteractionBase)Activator.CreateInstance(type);
|
||||
|
||||
return await command.Exec(interaction.Data);
|
||||
return await command.Exec(interaction);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue