new Quote command and bugfixes
This commit is contained in:
parent
a4cbc03202
commit
0b680d7fb2
4 changed files with 176 additions and 9 deletions
|
@ -15,11 +15,15 @@ namespace Geekbot.net.Lib
|
|||
// this.botOwnerDmChannel = botOwnerDmChannel;
|
||||
}
|
||||
|
||||
public void HandleCommandException(Exception e, ICommandContext Context)
|
||||
public void HandleCommandException(Exception e, ICommandContext Context, string errorMessage = "")
|
||||
{
|
||||
var errorMsg =
|
||||
$"Error Occured while executing \"{Context.Message.Content}\", executed by \"{Context.User.Username}\", complete message was \"{Context.Message}\"";
|
||||
logger.Error(e, errorMsg);
|
||||
if (!string.IsNullOrEmpty(errorMessage))
|
||||
{
|
||||
Context.Channel.SendMessageAsync(errorMessage);
|
||||
}
|
||||
// await botOwnerDmChannel.SendMessageAsync($"{errorMsg}```{e.StackTrace}```");
|
||||
// await Context.Channel.SendMessageAsync("Something went wrong...");
|
||||
}
|
||||
|
@ -27,6 +31,6 @@ namespace Geekbot.net.Lib
|
|||
|
||||
public interface IErrorHandler
|
||||
{
|
||||
void HandleCommandException(Exception e, ICommandContext Context);
|
||||
void HandleCommandException(Exception e, ICommandContext Context, string errorMessage = "");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue