again same crash, blank message

This commit is contained in:
Master Kwoth 2016-02-04 07:24:40 +01:00
parent 4db016a5e4
commit a81e924bb5
2 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,8 @@ namespace NadekoBot.Extensions {
/// <returns></returns> /// <returns></returns>
public static async Task Send(this MessageEventArgs e, string message) public static async Task Send(this MessageEventArgs e, string message)
{ {
if (string.IsNullOrWhiteSpace(message))
return;
await e.Channel.SendMessage(message); await e.Channel.SendMessage(message);
} }

View File

@ -19,6 +19,8 @@ namespace NadekoBot
private async void Client_MessageReceived(object sender, Discord.MessageEventArgs e) private async void Client_MessageReceived(object sender, Discord.MessageEventArgs e)
{ {
if (string.IsNullOrWhiteSpace(e.Message.Text))
return;
if (CopiedUsers.Contains(e.User.Id)) { if (CopiedUsers.Contains(e.User.Id)) {
await e.Send( e.Message.Text.Replace("@everyone","@everryone")); await e.Send( e.Message.Text.Replace("@everyone","@everryone"));
} }