Merge pull request #20 from Kwoth/dev

just pls
This commit is contained in:
miraai 2016-08-04 03:06:19 +02:00 committed by GitHub
commit 8b10427033
5 changed files with 373 additions and 361 deletions

View File

@ -728,7 +728,7 @@ namespace NadekoBot.Modules.Administration
});
cgb.CreateCommand(Prefix + "send")
.Description($"Send a message to someone on a different server through the bot. **Bot Owner Only!** | `{Prefix}send serverid|u:user_id Send this to a user!` or `{Prefix}send serverid|c:channel_id Send this to a channel!`")
.Description($"Send a message to someone on a different server through the bot. **Bot Owner Only!** | `{Prefix}send sid|u:uid Hello user!` or `{Prefix}send sid|c:cid Message to channel!` (cid = channel id, sid = server id)")
.Parameter("ids", ParameterType.Required)
.Parameter("msg", ParameterType.Unparsed)
.AddCheck(SimpleCheckers.OwnerOnly())

View File

@ -6,7 +6,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NadekoBot.Modules.Administration.Commands
{
@ -23,7 +22,7 @@ namespace NadekoBot.Modules.Administration.Commands
cgb.CreateCommand(Prefix + "addcustreact")
.Alias(Prefix + "acr")
.Description($"Add a custom reaction. Guide here: <https://github.com/Kwoth/NadekoBot/wiki/Custom-Reactions> **Bot Owner Only!** | `{Prefix}acr \"hello\" I love saying hello to %user%`")
.Description($"Add a custom reaction. Guide here: <https://github.com/Kwoth/NadekoBot/wiki/Custom-Reactions> **Bot Owner Only!** | `{Prefix}acr \"hello\" Hi there %user%`")
.AddCheck(SimpleCheckers.OwnerOnly())
.Parameter("name", ParameterType.Required)
.Parameter("message", ParameterType.Unparsed)

View File

@ -1,10 +1,37 @@
using Discord.Commands;
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |
// | \_| ''\---/'' |_/ |
// \ .-\__ '-' ___/-. /
// ___'. .' /--.--\ `. .'___
// ."" '< `.___\_<|>_/___.' >' "".
// | | : `- \`.;`\ _ /`;.`/ - ` : | |
// \ \ `_. \_ __\ /__ _/ .-` / /
// =====`-.____`.___ \_____/___.-`___.-'=====
// `=---='
//
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// 佛祖保佑 永无BUG
//
//
using Discord.Commands;
using NadekoBot.Extensions;
using NadekoBot.Modules;
using NadekoBot.Modules.Permissions.Classes;
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@ -47,30 +74,23 @@ namespace NadekoBot.Classes.Help.Commands
public Action<CommandEventArgs> DoGitFunc() => e =>
{
string helpstr =
$@"######For more information and how to setup your own NadekoBot, go to: <http://github.com/Kwoth/NadekoBot/wiki>
######You can donate on patreon: <https://patreon.com/nadekobot>
######or paypal: `nadekodiscordbot@gmail.com`
var helpstr = new StringBuilder();
#NadekoBot List Of Commands ";
string lastCategory = "";
var lastCategory = "";
foreach (var com in NadekoBot.Client.GetService<CommandService>().AllCommands)
{
if (com.Category != lastCategory)
{
helpstr += "\n### " + com.Category + " \n";
helpstr += "Command and aliases | Description | Usage\n";
helpstr += "----------------|--------------|-------\n";
helpstr.AppendLine("\n### " + com.Category + " ");
helpstr.AppendLine("Command and aliases | Description | Usage");
helpstr.AppendLine("----------------|--------------|-------");
lastCategory = com.Category;
}
helpstr += PrintCommandHelp(com);
helpstr.AppendLine($"`{com.Text}`{string.Concat(com.Aliases.Select(a => $", `{a}`"))} | {com.Description}");
}
helpstr = helpstr.Replace(NadekoBot.BotMention, "@BotName");
helpstr = helpstr.Replace(" |", " | ").Replace("**Usage**:", " | ").Replace("**Description:**", " | ").Replace("\n|", " | \n");
#if DEBUG
File.WriteAllText("../../../commandlist.md", helpstr);
File.WriteAllText("../../../docs/Commands List.md", helpstr.ToString());
#else
File.WriteAllText("commandlist.md", helpstr);
#endif
@ -92,13 +112,8 @@ $@"######For more information and how to setup your own NadekoBot, go to: <http:
.Description($"Sends a readme and a guide links to the channel. | `{Prefix}readme` or `{Prefix}guide`")
.Do(async e =>
await e.Channel.SendMessage(
@"**Wiki with all info**: <https://github.com/Kwoth/NadekoBot/wiki>
**WINDOWS SETUP GUIDE**: <https://github.com/Kwoth/NadekoBot/blob/master/ComprehensiveGuide.md>
**LINUX SETUP GUIDE**: <https://github.com/Kwoth/NadekoBot/blob/master/LinuxSetup.md>
**LIST OF COMMANDS**: <https://github.com/Kwoth/NadekoBot/blob/master/commandlist.md>").ConfigureAwait(false));
@"**LIST OF COMMANDS**: <http://nadekobot.readthedocs.io/en/latest/Commands%20List/>
**Hosting Guides and docs can be found here**: <http://nadekobot.rtfd.io>").ConfigureAwait(false));
cgb.CreateCommand(Module.Prefix + "donate")
.Alias("~donate")

View File

@ -679,7 +679,7 @@ namespace NadekoBot.Modules.Permissions
});
cgb.CreateCommand(Prefix + "ubl")
.Description($"Blacklists a mentioned user. | `{Prefix}ubl [user_mention]`")
.Description($"Blacklists a mentioned user. **Bot Owner Only!**| `{Prefix}ubl [user_mention]`")
.Parameter("user", ParameterType.Unparsed)
.AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e =>
@ -695,7 +695,7 @@ namespace NadekoBot.Modules.Permissions
});
cgb.CreateCommand(Prefix + "uubl")
.Description($"Unblacklists a mentioned user. | `{Prefix}uubl [user_mention]`")
.Description($"Unblacklists a mentioned user. **Bot Owner Only!** | `{Prefix}uubl [user_mention]`")
.Parameter("user", ParameterType.Unparsed)
.AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e =>
@ -780,7 +780,7 @@ namespace NadekoBot.Modules.Permissions
cgb.CreateCommand(Prefix + "cmdcooldown")
.Alias(Prefix+ "cmdcd")
.Description($"Sets a cooldown per user for a command. Set 0 to clear. | `{Prefix}cmdcd \"some cmd\" 5`")
.Description($"Sets a cooldown per user for a command. Set 0 to clear. **Needs Manager Messages Permissions**| `{Prefix}cmdcd \"some cmd\" 5`")
.Parameter("command", ParameterType.Required)
.Parameter("secs",ParameterType.Required)
.AddCheck(SimpleCheckers.ManageMessages())

View File

@ -1,6 +1,4 @@
You can donate on [Patreon](https://patreon.com/nadekobot) or paypal: `nadekodiscordbot@gmail.com`
#NadekoBot List Of Commands
### Help
Command and aliases | Description | Usage
----------------|--------------|-------
@ -27,7 +25,7 @@ Command and aliases | Description | Usage
`.userpresence` | Starts logging to this channel when someone from the server goes online/offline/idle. **Needs Manage Server Permissions.**| `.userpresence`
`.voicepresence` | Toggles logging to this channel whenever someone joins or leaves a voice channel you are in right now. **Needs Manage Server Permissions.**| `.voicerpresence`
`.repeatinvoke`, `.repinv` | Immediately shows the repeat message and restarts the timer. **Needs Manage Messages Permissions.**| `.repinv`
`.repeat` | Repeat a message every X minutes. If no parameters are specified, repeat is disabled. **Needs Manage Messages Permissions.** | `.repeat 5 Hello there`
`.repeat` | Repeat a message every X minutes. If no parameters are specified, repeat is disabled. **Needs Manage Messages Permissions.** |`.repeat 5 Hello there`
`.rotateplaying`, `.ropl` | Toggles rotation of playing status of the dynamic strings you specified earlier. **Bot Owner Only!** | `.ropl`
`.addplaying`, `.adpl` | Adds a specified string to the list of playing strings to rotate. Supported placeholders: %servers%, %users%, %playing%, %queued%, %trivia% **Bot Owner Only!**| `.adpl`
`.listplaying`, `.lipl` | Lists all playing statuses with their corresponding number. **Bot Owner Only!**| `.lipl`
@ -45,12 +43,12 @@ Needs Manage Roles and Manage Channels Permissions.** | `.cleanv+t`
`.togglexclsar`, `.tesar` | toggle whether the self-assigned roles should be exclusive | `.tesar`
`.iam` | Adds a role to you that you choose. Role must be on a list of self-assignable roles. | `.iam Gamer`
`.iamnot`, `.iamn` | Removes a role to you that you choose. Role must be on a list of self-assignable roles. | `.iamn Gamer`
`.addcustreact`, `.acr` | Add a custom reaction. Guide here: <https://github.com/Kwoth/NadekoBot/wiki/Custom-Reactions> **Bot Owner Only!** | `.acr "hello" I love saying hello to %user%`
`.listcustreact`, `.lcr` | Lists custom reactions (paginated with 30 commands per page). Use 'all' instead of page number to get all custom reactions DM-ed to you. | `.lcr 1`
`.showcustreact`, `.scr` | Shows all possible responses from a single custom reaction. | `.scr %mention% bb`
`.addcustreact`, `.acr` | Add a custom reaction. Guide here: <https://github.com/Kwoth/NadekoBot/wiki/Custom-Reactions> **Bot Owner Only!** | `.acr "hello" Hi there %user%`
`.listcustreact`, `.lcr` | Lists custom reactions (paginated with 30 commands per page). Use 'all' instead of page number to get all custom reactions DM-ed to you. |`.lcr 1`
`.showcustreact`, `.scr` | Shows all possible responses from a single custom reaction. |`.scr %mention% bb`
`.editcustreact`, `.ecr` | Edits a custom reaction, arguments are custom reactions name, index to change, and a (multiword) message **Bot Owner Only** | `.ecr "%mention% disguise" 2 Test 123`
`.delcustreact`, `.dcr` | Deletes a custom reaction with given name (and index). **Bot Owner Only.**| `.dcr index`
`.autoassignrole`, `.aar` | Automaticaly assigns a specified role to every user who joins the server. **Needs Manage Roles Permissions.** | `.aar` to disable, `.aar Role Name` to enable
`.autoassignrole`, `.aar` | Automaticaly assigns a specified role to every user who joins the server. **Needs Manage Roles Permissions.** |`.aar` to disable, `.aar Role Name` to enable
`.leave` | Makes Nadeko leave the server. Either name or id required. **Bot Owner Only!**| `.leave 123123123331`
`.listincidents`, `.lin` | List all UNREAD incidents and flags them as read. **Needs Manage Server Permissions.**| `.lin`
`.listallincidents`, `.lain` | Sends you a file containing all incidents and flags them as read. **Needs Manage Server Permissions.**| `.lain`
@ -81,7 +79,7 @@ Needs Manage Roles and Manage Channels Permissions.** | `.cleanv+t`
`.setname`, `.newnm` | Give the bot a new name. **Bot Owner Only!** | .newnm BotName
`.newavatar`, `.setavatar` | Sets a new avatar image for the NadekoBot. Argument is a direct link to an image. **Bot Owner Only!** | `.setavatar https://i.ytimg.com/vi/WDudkR1eTMM/maxresdefault.jpg`
`.setgame` | Sets the bots game. **Bot Owner Only!** | `.setgame Playing with kwoth`
`.send` | Send a message to someone on a different server through the bot. **Bot Owner Only!** | `.send serverid|u:user_id Send this to a user!` or `.send serverid|c:channel_id Send this to a channel!`
`.send` | Send a message to someone on a different server through the bot. **Bot Owner Only!** | `.send sid|u:uid Hello user!` or `.send sid|c:cid Message to channel!` (cid = channel id, sid = server id)
`.mentionrole`, `.menro` | Mentions every person from the provided role or roles (separated by a ',') on this server. Requires you to have mention everyone permission. | `.menro RoleName`
`.unstuck` | Clears the message queue. **Bot Owner Only!** | `.unstuck`
`.donators` | List of lovely people who donated to keep this project alive. | `.donators`
@ -94,9 +92,9 @@ Command and aliases | Description | Usage
----------------|--------------|-------
`.remind` | Sends a message to you or a channel after certain amount of time. First argument is me/here/'channelname'. Second argument is time in a descending order (mo>w>d>h>m) example: 1w5d3h10m. Third argument is a (multiword)message. | `.remind me 1d5h Do something` or `.remind #general Start now!`
`.remindmsg` | Sets message for when the remind is triggered. Available placeholders are %user% - user who ran the command, %message% - Message specified in the remind, %target% - target channel of the remind. **Bot Owner Only!** | `.remindmsg do something else`
`.serverinfo`, `.sinfo` | Shows info about the server the bot is on. If no channel is supplied, it defaults to current one. | `.sinfo Some Server`
`.channelinfo`, `.cinfo` | Shows info about the channel. If no channel is supplied, it defaults to current one. | `.cinfo #some-channel`
`.userinfo`, `.uinfo` | Shows info about the user. If no user is supplied, it defaults a user running the command. | `.uinfo @SomeUser`
`.serverinfo`, `.sinfo` | Shows info about the server the bot is on. If no channel is supplied, it defaults to current one. |`.sinfo Some Server`
`.channelinfo`, `.cinfo` | Shows info about the channel. If no channel is supplied, it defaults to current one. |`.cinfo #some-channel`
`.userinfo`, `.uinfo` | Shows info about the user. If no user is supplied, it defaults a user running the command. |`.uinfo @SomeUser`
`.whoplays` | Shows a list of users who are playing the specified game. | `.whoplays Overwatch`
`.inrole` | Lists every person from the provided role or roles (separated by a ',') on this server. If the list is too long for 1 message, you must have Manage Messages permission. | `.inrole Role`
`.checkmyperms` | Checks your userspecific permissions on this channel. | `.checkmyperms`
@ -119,9 +117,9 @@ Command and aliases | Description | Usage
`;lstfilterwords`, `;lfw` | Shows a list of filtered words | `;lfw`
`;srvrfilterwords`, `;sfw` | Enables or disables automatic deleting of messages containing forbidden words on the server. | `;sfw disable`
`;permrole`, `;pr` | Sets a role which can change permissions. Or supply no parameters to find out the current one. Default one is 'Nadeko'. | `;pr role`
`;rolepermscopy`, `;rpc` | Copies BOT PERMISSIONS (not discord permissions) from one role to another. | `;rpc Some Role ~ Some other role`
`;chnlpermscopy`, `;cpc` | Copies BOT PERMISSIONS (not discord permissions) from one channel to another. | `;cpc Some Channel ~ Some other channel`
`;usrpermscopy`, `;upc` | Copies BOT PERMISSIONS (not discord permissions) from one role to another. | `;upc @SomeUser ~ @SomeOtherUser`
`;rolepermscopy`, `;rpc` | Copies BOT PERMISSIONS (not discord permissions) from one role to another. |`;rpc Some Role ~ Some other role`
`;chnlpermscopy`, `;cpc` | Copies BOT PERMISSIONS (not discord permissions) from one channel to another. |`;cpc Some Channel ~ Some other channel`
`;usrpermscopy`, `;upc` | Copies BOT PERMISSIONS (not discord permissions) from one role to another. |`;upc @SomeUser ~ @SomeOtherUser`
`;verbose`, `;v` | Sets whether to show when a command/module is blocked. | `;verbose true`
`;srvrperms`, `;sp` | Shows banned permissions for this server. | `;sp`
`;roleperms`, `;rp` | Shows banned permissions for a certain role. No argument means for everyone. | `;rp AwesomeRole`
@ -141,12 +139,12 @@ Command and aliases | Description | Usage
`;allchnlcmds`, `;acc` | Sets permissions for all commands from a certain module at the channel level. | `;acc "module name" [enable/disable] SomeChannel`
`;allrolemdls`, `;arm` | Sets permissions for all modules at the role level. | `;arm [enable/disable] MyRole`
`;allrolecmds`, `;arc` | Sets permissions for all commands from a certain module at the role level. | `;arc "module name" [enable/disable] MyRole`
`;ubl` | Blacklists a mentioned user. | `;ubl [user_mention]`
`;uubl` | Unblacklists a mentioned user. | `;uubl [user_mention]`
`;ubl` | Blacklists a mentioned user. **Bot Owner Only!**| `;ubl [user_mention]`
`;uubl` | Unblacklists a mentioned user. **Bot Owner Only!** | `;uubl [user_mention]`
`;cbl` | Blacklists a mentioned channel (#general for example). | `;cbl #some_channel`
`;cubl` | Unblacklists a mentioned channel (#general for example). | `;cubl #some_channel`
`;sbl` | Blacklists a server by a name or id (#general for example). **BOT OWNER ONLY** | `;sbl [servername/serverid]`
`;cmdcooldown`, `;cmdcd` | Sets a cooldown per user for a command. Set 0 to clear. | `;cmdcd "some cmd" 5`
`;cmdcooldown`, `;cmdcd` | Sets a cooldown per user for a command. Set 0 to clear. **Needs Manager Messages Permissions**| `;cmdcd "some cmd" 5`
`;allcmdcooldowns`, `;acmdcds` | Shows a list of all commands and their respective cooldowns. | `;acmdcds`
### Conversations
@ -176,7 +174,7 @@ Command and aliases | Description | Usage
`$race` | Starts a new animal race. | `$race`
`$joinrace`, `$jr` | Joins a new race. You can specify an amount of flowers for betting (optional). You will get YourBet*(participants-1) back if you win. | `$jr` or `$jr 5`
`$raffle` | Prints a name and ID of a random user from the online list from the (optional) role. | `$raffle` or `$raffle RoleName`
`$$$` | Check how much NadekoFlowers a person has. (Defaults to yourself) | `$$$` or `$$$ @Someone`
`$$$` | Check how much NadekoFlowers a person has. (Defaults to yourself) |`$$$` or `$$$ @Someone`
`$give` | Give someone a certain amount of NadekoFlowers|`$give 1 "@SomeGuy"`
`$award` | Gives someone a certain amount of flowers. **Bot Owner Only!** | `$award 100 @person`
`$take` | Takes a certain amount of flowers from someone. **Bot Owner Only!** | `$take 1 "@someguy"`
@ -186,7 +184,7 @@ Command and aliases | Description | Usage
### Games
Command and aliases | Description | Usage
----------------|--------------|-------
`>t` | Starts a game of trivia. You can add nohint to prevent hints.First player to get to 10 points wins by default. You can specify a different number. 30 seconds per question. | `>t nohint` or `>t 5 nohint`
`>t` | Starts a game of trivia. You can add nohint to prevent hints.First player to get to 10 points wins by default. You can specify a different number. 30 seconds per question. |`>t nohint` or `>t 5 nohint`
`>tl` | Shows a current trivia leaderboard. | `>tl`
`>tq` | Quits current trivia after current question. | `>tq`
`>typestart` | Starts a typing contest. | `>typestart`
@ -234,7 +232,7 @@ Command and aliases | Description | Usage
`!!rpeatplaylst`, `!!rpl` | Toggles repeat of all songs in the queue (every song that finishes is added to the end of the queue). | `!!rpl`
`!!save` | Saves a playlist under a certain name. Name must be no longer than 20 characters and mustn't contain dashes. | `!!save classical1`
`!!load` | Loads a playlist under a certain name. | `!!load classical-1`
`!!playlists`, `!!pls` | Lists all playlists. Paginated. 20 per page. Default page is 0. | `!!pls 1`
`!!playlists`, `!!pls` | Lists all playlists. Paginated. 20 per page. Default page is 0. |`!!pls 1`
`!!deleteplaylist`, `!!delpls` | Deletes a saved playlist. Only if you made it or if you are the bot owner. | `!!delpls animu-5`
`!!goto` | Goes to a specific time in seconds in a song. | `!!goto 30`
`!!getlink`, `!!gl` | Shows a link to the song in the queue by index, or the currently playing song by default. | `!!gl`
@ -243,7 +241,7 @@ Command and aliases | Description | Usage
### Searches
Command and aliases | Description | Usage
----------------|--------------|-------
`~lolchamp` | Shows League Of Legends champion statistics. If there are spaces/apostrophes or in the name - omit them. Optional second parameter is a role. | `~lolchamp Riven` or `~lolchamp Annie sup`
`~lolchamp` | Shows League Of Legends champion statistics. If there are spaces/apostrophes or in the name - omit them. Optional second parameter is a role. |`~lolchamp Riven` or `~lolchamp Annie sup`
`~lolban` | Shows top 6 banned champions ordered by ban rate. Ban these champions and you will be Plat 5 in no time. | `~lolban`
`~hitbox`, `~hb` | Notifies this channel when a certain user starts streaming. | `~hitbox SomeStreamer`
`~twitch`, `~tw` | Notifies this channel when a certain user starts streaming. | `~twitch SomeStreamer`
@ -258,8 +256,8 @@ Command and aliases | Description | Usage
`~wowjoke` | Get one of Kwoth's penultimate WoW jokes. | `~wowjoke`
`~calculate`, `~calc` | Evaluate a mathematical expression. | `~calc 1+1`
`~osu` | Shows osu stats for a player. | `~osu Name` or `~osu Name taiko`
`~osu b` | Shows information about an osu beatmap. | `~osu b` https://osu.ppy.sh/s/127712
`~osu top5` | Displays a user's top 5 plays. | `~osu top5 Name`
`~osu b` | Shows information about an osu beatmap. |`~osu b` https://osu.ppy.sh/s/127712
`~osu top5` | Displays a user's top 5 plays. |`~osu top5 Name`
`~pokemon`, `~poke` | Searches for a pokemon. | `~poke Sylveon`
`~pokemonability`, `~pokeab` | Searches for a pokemon ability. | `~pokeab "water gun"`
`~memelist` | Pulls a list of memes you can use with `~memegen` from http://memegen.link/templates/ | `~memelist`