Added RespondWithDmAsync method to CommandContext
Created by: igromanru
Summary
Implemented a simple function in CommandContext that allows us quickly respond to a message with a DM to the author of the message.
Details
Method CommandContext.RespondWithDmAsync
checks for us, if the user sent a command/message over a channel or as a DM to the bot and uses the right function to respond in a DM to the user.
if (this.Member != null)
{
this.Member.SendMessageAsync(...);
}
else
{
this.RespondAsync(...);
}
Changes proposed
- Added method
RespondWithDmAsync
to the classCommandContext
Notes
This is just a simple "quality of life improvement". I'm using it a lot in my bot to send sensitive data to the user.