commit
ca96c01ea5
@ -145,7 +145,7 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
|
|
||||||
cgb.CreateCommand(Prefix + "delcustreact")
|
cgb.CreateCommand(Prefix + "delcustreact")
|
||||||
.Alias(Prefix + "dcr")
|
.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("name", ParameterType.Required)
|
||||||
.Parameter("index", ParameterType.Optional)
|
.Parameter("index", ParameterType.Optional)
|
||||||
.AddCheck(SimpleCheckers.OwnerOnly())
|
.AddCheck(SimpleCheckers.OwnerOnly())
|
||||||
|
@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
{
|
{
|
||||||
NadekoBot.OnReady += () =>
|
NadekoBot.OnReady += () =>
|
||||||
{
|
{
|
||||||
NadekoBot.Client.MessageReceived += MsgRecivd;
|
//NadekoBot.Client.MessageReceived += MsgRecivd;
|
||||||
NadekoBot.Client.MessageDeleted += MsgDltd;
|
NadekoBot.Client.MessageDeleted += MsgDltd;
|
||||||
NadekoBot.Client.MessageUpdated += MsgUpdtd;
|
NadekoBot.Client.MessageUpdated += MsgUpdtd;
|
||||||
NadekoBot.Client.UserUpdated += UsrUpdtd;
|
NadekoBot.Client.UserUpdated += UsrUpdtd;
|
||||||
@ -202,35 +202,35 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void MsgRecivd(object sender, MessageEventArgs e)
|
// private async void MsgRecivd(object sender, MessageEventArgs e)
|
||||||
{
|
// {
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
if (e.Server == null || e.Channel.IsPrivate || e.User.Id == NadekoBot.Client.CurrentUser.Id)
|
// if (e.Server == null || e.Channel.IsPrivate || e.User.Id == NadekoBot.Client.CurrentUser.Id)
|
||||||
return;
|
// return;
|
||||||
var config = SpecificConfigurations.Default.Of(e.Server.Id);
|
// var config = SpecificConfigurations.Default.Of(e.Server.Id);
|
||||||
var chId = config.LogServerChannel;
|
// var chId = config.LogServerChannel;
|
||||||
if (chId == null || e.Channel.Id == chId || config.LogserverIgnoreChannels.Contains(e.Channel.Id))
|
// if (chId == null || e.Channel.Id == chId || config.LogserverIgnoreChannels.Contains(e.Channel.Id))
|
||||||
return;
|
// return;
|
||||||
Channel ch;
|
// Channel ch;
|
||||||
if ((ch = e.Server.TextChannels.Where(tc => tc.Id == chId).FirstOrDefault()) == null)
|
// if ((ch = e.Server.TextChannels.Where(tc => tc.Id == chId).FirstOrDefault()) == null)
|
||||||
return;
|
// return;
|
||||||
if (!string.IsNullOrWhiteSpace(e.Message.Text))
|
// if (!string.IsNullOrWhiteSpace(e.Message.Text))
|
||||||
{
|
// {
|
||||||
await ch.SendMessage(
|
// await ch.SendMessage(
|
||||||
$@"🕔`{prettyCurrentTime}` **New Message** `#{e.Channel.Name}`
|
// $@"🕔`{prettyCurrentTime}` **New Message** `#{e.Channel.Name}`
|
||||||
👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text.Unmention()}").ConfigureAwait(false);
|
//👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text.Unmention()}").ConfigureAwait(false);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
await ch.SendMessage(
|
// await ch.SendMessage(
|
||||||
$@"🕔`{prettyCurrentTime}` **File Uploaded** `#{e.Channel.Name}`
|
// $@"🕔`{prettyCurrentTime}` **File Uploaded** `#{e.Channel.Name}`
|
||||||
👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Attachments.FirstOrDefault()?.ProxyUrl}").ConfigureAwait(false);
|
//👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Attachments.FirstOrDefault()?.ProxyUrl}").ConfigureAwait(false);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
catch { }
|
// catch { }
|
||||||
}
|
// }
|
||||||
private async void MsgDltd(object sender, MessageEventArgs e)
|
private async void MsgDltd(object sender, MessageEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -158,5 +158,5 @@
|
|||||||
"CurrencySign": "🌸",
|
"CurrencySign": "🌸",
|
||||||
"CurrencyName": "NadekoFlower",
|
"CurrencyName": "NadekoFlower",
|
||||||
"DMHelpString": "Type `-h` for help.",
|
"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