>attack command clarified, commandlist updated, .lcr all
is now a thing and sends you list of all custom reactions in DM
This commit is contained in:
parent
57bc26dd46
commit
33176f8943
1
.gitignore
vendored
1
.gitignore
vendored
@ -41,3 +41,4 @@ NadekoBot.sln.iml
|
|||||||
.idea/workspace.xml
|
.idea/workspace.xml
|
||||||
.idea/vcs.xml
|
.idea/vcs.xml
|
||||||
.idea/modules.xml
|
.idea/modules.xml
|
||||||
|
NadekoBot/bin/Debug/data/config_xnaas.json
|
@ -359,7 +359,7 @@ namespace NadekoBot.Classes
|
|||||||
|
|
||||||
using (var streamWriter = new StreamWriter(await httpWebRequest.GetRequestStreamAsync().ConfigureAwait(false)))
|
using (var streamWriter = new StreamWriter(await httpWebRequest.GetRequestStreamAsync().ConfigureAwait(false)))
|
||||||
{
|
{
|
||||||
var json = "{\"longUrl\":\"" + url + "\"}";
|
var json = "{\"longUrl\":\"" + Uri.EscapeDataString(url) + "\"}";
|
||||||
streamWriter.Write(json);
|
streamWriter.Write(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using NadekoBot.Classes;
|
using NadekoBot.Classes;
|
||||||
using NadekoBot.Modules.Permissions.Classes;
|
using NadekoBot.Modules.Permissions.Classes;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -46,16 +47,29 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
|
|
||||||
cgb.CreateCommand(Prefix + "listcustreact")
|
cgb.CreateCommand(Prefix + "listcustreact")
|
||||||
.Alias(Prefix + "lcr")
|
.Alias(Prefix + "lcr")
|
||||||
.Description($"Lists all current custom reactions (paginated with 30 commands per page).\n**Usage**:{Prefix}lcr 1")
|
.Description($"Lists custom reactions (paginated with 30 commands per page). Use 'all' instead of page number to get all custom reactions DM-ed to you. \n**Usage**:{Prefix}lcr 1")
|
||||||
.Parameter("num", ParameterType.Required)
|
.Parameter("num", ParameterType.Required)
|
||||||
.Do(async e =>
|
.Do(async e =>
|
||||||
{
|
{
|
||||||
|
var numStr = e.GetArg("num");
|
||||||
|
|
||||||
|
if (numStr.ToUpperInvariant() == "ALL")
|
||||||
|
{
|
||||||
|
var fullstr = String.Join("\n", NadekoBot.Config.CustomReactions.Select(kvp => kvp.Key));
|
||||||
|
do
|
||||||
|
{
|
||||||
|
var str = string.Concat(fullstr.Take(1900));
|
||||||
|
fullstr = new string(fullstr.Skip(1900).ToArray());
|
||||||
|
await e.User.SendMessage("```xl\n" + str + "```");
|
||||||
|
} while (fullstr.Length != 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
int num;
|
int num;
|
||||||
if (!int.TryParse(e.GetArg("num"), out num) || num <= 0) num = 1;
|
if (!int.TryParse(numStr, out num) || num <= 0) num = 1;
|
||||||
var cmds = GetCustomsOnPage(num - 1);
|
var cmds = GetCustomsOnPage(num - 1);
|
||||||
if (!cmds.Any())
|
if (!cmds.Any())
|
||||||
{
|
{
|
||||||
await e.Channel.SendMessage("");
|
await e.Channel.SendMessage("`There are no custom reactions.`");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -55,11 +55,15 @@ namespace NadekoBot.Modules.Help
|
|||||||
}
|
}
|
||||||
var i = 0;
|
var i = 0;
|
||||||
if (module != "customreactions" && module != "conversations")
|
if (module != "customreactions" && module != "conversations")
|
||||||
|
{
|
||||||
await e.Channel.SendMessage("`List Of Commands:`\n" + SearchHelper.ShowInPrettyCode<Command>(cmdsArray,
|
await e.Channel.SendMessage("`List Of Commands:`\n" + SearchHelper.ShowInPrettyCode<Command>(cmdsArray,
|
||||||
el => $"{el.Text,-15}{"[" + el.Aliases.FirstOrDefault() + "]",-8}"))
|
el => $"{el.Text,-15}{"[" + el.Aliases.FirstOrDefault() + "]",-8}"))
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
await e.Channel.SendMessage("`List Of Commands:`\n• " + string.Join("\n• ", cmdsArray.Select(c => $"{c.Text}")));
|
await e.Channel.SendMessage("`List Of Commands:`\n• " + string.Join("\n• ", cmdsArray.Select(c => $"{c.Text}")));
|
||||||
|
}
|
||||||
await e.Channel.SendMessage($"`You can type \"{Prefix}h command_name\" to see the help about that specific command.`").ConfigureAwait(false);
|
await e.Channel.SendMessage($"`You can type \"{Prefix}h command_name\" to see the help about that specific command.`").ConfigureAwait(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -80,7 +80,7 @@ namespace NadekoBot.Modules.Pokemon
|
|||||||
commands.ForEach(cmd => cmd.Init(cgb));
|
commands.ForEach(cmd => cmd.Init(cgb));
|
||||||
|
|
||||||
cgb.CreateCommand(Prefix + "attack")
|
cgb.CreateCommand(Prefix + "attack")
|
||||||
.Description("Attacks a target with the given move")
|
.Description($"Attacks a target with the given move. Use `{Prefix}movelist` to see a list of moves your type can use. | `{Prefix}attack \"vine whip\" @someguy`")
|
||||||
.Parameter("move", ParameterType.Required)
|
.Parameter("move", ParameterType.Required)
|
||||||
.Parameter("target", ParameterType.Unparsed)
|
.Parameter("target", ParameterType.Unparsed)
|
||||||
.Do(async e =>
|
.Do(async e =>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"DontJoinServers": false,
|
"DontJoinServers": false,
|
||||||
"ForwardMessages": true,
|
"ForwardMessages": true,
|
||||||
|
"ForwardToAllOwners": false,
|
||||||
"IsRotatingStatus": false,
|
"IsRotatingStatus": false,
|
||||||
"BufferSize": 4194304,
|
"BufferSize": 4194304,
|
||||||
"Quotes": [],
|
"Quotes": [],
|
||||||
|
Loading…
Reference in New Issue
Block a user