again same crash, blank message
This commit is contained in:
parent
4db016a5e4
commit
a81e924bb5
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user