commit
ca96c01ea5
@ -145,7 +145,7 @@ namespace NadekoBot.Modules.Administration.Commands
|
||||
|
||||
cgb.CreateCommand(Prefix + "delcustreact")
|
||||
.Alias(Prefix + "dcr")
|
||||
.Description($"Deletes a custom reaction with given name (and index). **Bot Owner Only.**| `{Prefix}dcr index`")
|
||||
.Description($"Deletes a custom reaction with given name (and optional index). **Bot Owner Only.**| `{Prefix}dcr \"Reaction Name\"` or `{Prefix}dcr \"Reaction Name\" 3`")
|
||||
.Parameter("name", ParameterType.Required)
|
||||
.Parameter("index", ParameterType.Optional)
|
||||
.AddCheck(SimpleCheckers.OwnerOnly())
|
||||
|
@ -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