From 1f2782fe32675cc8e2903bc08cdab2d771979c61 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sat, 24 Sep 2016 01:20:55 +0200 Subject: [PATCH] Removed message created and file uploaded logserver events --- .../Administration/Commands/LogCommand.cs | 58 +++++++++---------- NadekoBot/bin/Debug/data/config_example.json | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 87a0723e..21973116 100644 --- a/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Administration.Commands { NadekoBot.OnReady += () => { - NadekoBot.Client.MessageReceived += MsgRecivd; + //NadekoBot.Client.MessageReceived += MsgRecivd; NadekoBot.Client.MessageDeleted += MsgDltd; NadekoBot.Client.MessageUpdated += MsgUpdtd; NadekoBot.Client.UserUpdated += UsrUpdtd; @@ -202,35 +202,35 @@ namespace NadekoBot.Modules.Administration.Commands catch { } } - private async void MsgRecivd(object sender, MessageEventArgs e) - { - try - { - if (e.Server == null || e.Channel.IsPrivate || e.User.Id == NadekoBot.Client.CurrentUser.Id) - return; - var config = SpecificConfigurations.Default.Of(e.Server.Id); - var chId = config.LogServerChannel; - if (chId == null || e.Channel.Id == chId || config.LogserverIgnoreChannels.Contains(e.Channel.Id)) - return; - Channel ch; - if ((ch = e.Server.TextChannels.Where(tc => tc.Id == chId).FirstOrDefault()) == null) - return; - if (!string.IsNullOrWhiteSpace(e.Message.Text)) - { - await ch.SendMessage( - $@"🕔`{prettyCurrentTime}` **New Message** `#{e.Channel.Name}` -👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text.Unmention()}").ConfigureAwait(false); - } - else - { - await ch.SendMessage( - $@"🕔`{prettyCurrentTime}` **File Uploaded** `#{e.Channel.Name}` -👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Attachments.FirstOrDefault()?.ProxyUrl}").ConfigureAwait(false); - } + // private async void MsgRecivd(object sender, MessageEventArgs e) + // { + // try + // { + // if (e.Server == null || e.Channel.IsPrivate || e.User.Id == NadekoBot.Client.CurrentUser.Id) + // return; + // var config = SpecificConfigurations.Default.Of(e.Server.Id); + // var chId = config.LogServerChannel; + // if (chId == null || e.Channel.Id == chId || config.LogserverIgnoreChannels.Contains(e.Channel.Id)) + // return; + // Channel ch; + // if ((ch = e.Server.TextChannels.Where(tc => tc.Id == chId).FirstOrDefault()) == null) + // return; + // if (!string.IsNullOrWhiteSpace(e.Message.Text)) + // { + // await ch.SendMessage( + // $@"🕔`{prettyCurrentTime}` **New Message** `#{e.Channel.Name}` + //👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text.Unmention()}").ConfigureAwait(false); + // } + // else + // { + // await ch.SendMessage( + // $@"🕔`{prettyCurrentTime}` **File Uploaded** `#{e.Channel.Name}` + //👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Attachments.FirstOrDefault()?.ProxyUrl}").ConfigureAwait(false); + // } - } - catch { } - } + // } + // catch { } + // } private async void MsgDltd(object sender, MessageEventArgs e) { try diff --git a/NadekoBot/bin/Debug/data/config_example.json b/NadekoBot/bin/Debug/data/config_example.json index 25fd8c03..5c9bb0a4 100644 --- a/NadekoBot/bin/Debug/data/config_example.json +++ b/NadekoBot/bin/Debug/data/config_example.json @@ -158,5 +158,5 @@ "CurrencySign": "🌸", "CurrencyName": "NadekoFlower", "DMHelpString": "Type `-h` for help.", - "HelpString": "You can use `{0}modules` command to see a list of all modules.\r\nYou can use `{0}commands ModuleName`\r\n(for example `{0}commands Administration`) to see a list of all of the commands in that module.\r\nFor a specific command help, use `{0}h \"Command name\"` (for example `-h \"!m q\"`)\r\n\r\n\r\n**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**\r\n\r\n\r\n\r\nNadeko Support Server: " + "HelpString": "You can use `{0}modules` command to see a list of all modules.\r\nYou can use `{0}commands ModuleName`\r\n(for example `{0}commands Administration`) to see a list of all of the commands in that module.\r\nFor a specific command help, use `{0}h \"Command name\"` (for example `-h \"!m q\"`)\r\n\r\n\r\n**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**\r\n\r\n\r\n\r\nNadeko Support Server: " } \ No newline at end of file