Message received nolonger triggers on bots woop

This commit is contained in:
Kwoth 2016-12-28 18:12:01 +01:00
parent d3ced15d50
commit 4b80618890
3 changed files with 9 additions and 2 deletions

View File

@ -69,6 +69,8 @@ namespace NadekoBot.Modules.Administration
try
{
var usrMsg = umsg as IUserMessage;
if (usrMsg == null)
return;
var channel = usrMsg.Channel as ITextChannel;
if (channel == null || usrMsg.IsAuthor())

View File

@ -70,7 +70,7 @@ namespace NadekoBot.Modules.Music.Classes
Title = svideo.FullName,
Provider = "SoundCloud",
Uri = svideo.StreamLink,
ProviderType = MusicType.Normal,
ProviderType = MusicType.Soundcloud,
Query = svideo.TrackLink,
AlbumArt = svideo.artwork_url,
})

View File

@ -42,7 +42,12 @@ namespace NadekoBot
var client = new DiscordSocketClient(discordSocketConfig);
clientList.Add(client);
client.UserJoined += arg1 => { UserJoined(arg1); return Task.CompletedTask; };
client.MessageReceived += arg1 => { MessageReceived(arg1); return Task.CompletedTask; };
client.MessageReceived += arg1 =>
{
if (arg1.Author == null || arg1.Author.IsBot)
return Task.CompletedTask; MessageReceived(arg1);
return Task.CompletedTask;
};
client.UserLeft += arg1 => { UserLeft(arg1); return Task.CompletedTask; };
client.UserUpdated += (arg1, gu2) => { UserUpdated(arg1, gu2); return Task.CompletedTask; };
client.MessageUpdated += (arg1, m2) => { MessageUpdated(arg1, m2); return Task.CompletedTask; };