Removed message created and file uploaded logserver events
This commit is contained in:
parent
ffc0bf7e03
commit
1f2782fe32
@ -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
|
||||
|
@ -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<https://github.com/Kwoth/NadekoBot/blob/master/commandlist.md>\r\n\r\n\r\nNadeko Support Server: <https://discord.gg/0ehQwTK2RBjAxzEY>"
|
||||
"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<http://nadekobot.readthedocs.io/en/latest/Commands%20List/>\r\n\r\n\r\nNadeko Support Server: <https://discord.gg/0ehQwTK2RBjAxzEY>"
|
||||
}
|
Loading…
Reference in New Issue
Block a user