commandlist update

This commit is contained in:
Master Kwoth 2016-03-28 02:58:34 +02:00
parent 5e154cbcd1
commit c9c572296a
3 changed files with 125 additions and 69 deletions

View File

@ -1,19 +1,22 @@
using System; using Discord.Commands;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord.Commands;
using System.Drawing;
using NadekoBot.Classes; using NadekoBot.Classes;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules; using NadekoBot.Modules;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NadekoBot.Commands { namespace NadekoBot.Commands
internal class LoLCommands : DiscordCommand { {
internal class LoLCommands : DiscordCommand
{
private class CachedChampion { private class CachedChampion
{
public System.IO.Stream ImageStream { get; set; } public System.IO.Stream ImageStream { get; set; }
public DateTime AddedAt { get; set; } public DateTime AddedAt { get; set; }
public string Name { get; set; } public string Name { get; set; }
@ -24,16 +27,20 @@ namespace NadekoBot.Commands {
private System.Timers.Timer clearTimer { get; } = new System.Timers.Timer(); private System.Timers.Timer clearTimer { get; } = new System.Timers.Timer();
public LoLCommands(DiscordModule module) : base(module) { public LoLCommands(DiscordModule module) : base(module)
{
clearTimer.Interval = new TimeSpan(0, 10, 0).TotalMilliseconds; clearTimer.Interval = new TimeSpan(0, 10, 0).TotalMilliseconds;
clearTimer.Start(); clearTimer.Start();
clearTimer.Elapsed += (s, e) => { clearTimer.Elapsed += (s, e) =>
try { {
try
{
lock (cacheLock) lock (cacheLock)
CachedChampionImages = CachedChampionImages CachedChampionImages = CachedChampionImages
.Where(kvp => DateTime.Now - kvp.Value.AddedAt > new TimeSpan(1, 0, 0)) .Where(kvp => DateTime.Now - kvp.Value.AddedAt > new TimeSpan(1, 0, 0))
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); .ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
} catch { } }
catch { }
}; };
} }
@ -44,11 +51,13 @@ namespace NadekoBot.Commands {
"If you consider playing teemo, do it. If you consider teemo, you deserve him.", "If you consider playing teemo, do it. If you consider teemo, you deserve him.",
"Doesn't matter what you ban really. Enemy will ban your main and you will lose." }; "Doesn't matter what you ban really. Enemy will ban your main and you will lose." };
public Func<CommandEventArgs, Task> DoFunc() { public Func<CommandEventArgs, Task> DoFunc()
{
throw new NotImplementedException(); throw new NotImplementedException();
} }
private class MatchupModel { private class MatchupModel
{
public int Games { get; set; } public int Games { get; set; }
public float WinRate { get; set; } public float WinRate { get; set; }
[Newtonsoft.Json.JsonProperty("key")] [Newtonsoft.Json.JsonProperty("key")]
@ -56,48 +65,60 @@ namespace NadekoBot.Commands {
public float StatScore { get; set; } public float StatScore { get; set; }
} }
internal override void Init(CommandGroupBuilder cgb) { internal override void Init(CommandGroupBuilder cgb)
{
cgb.CreateCommand(Module.Prefix + "lolchamp") cgb.CreateCommand(Module.Prefix + "lolchamp")
.Description("Shows League Of Legends champion statistics. If there are spaces/apostrophes or in the name - omit them. Optional second parameter is a role.\n**Usage**:~lolchamp Riven or ~lolchamp Annie sup") .Description("Shows League Of Legends champion statistics. If there are spaces/apostrophes or in the name - omit them. Optional second parameter is a role.\n**Usage**:~lolchamp Riven or ~lolchamp Annie sup")
.Parameter("champ", ParameterType.Required) .Parameter("champ", ParameterType.Required)
.Parameter("position", ParameterType.Unparsed) .Parameter("position", ParameterType.Unparsed)
.Do(async e => { .Do(async e =>
try { {
try
{
//get role //get role
var role = ResolvePos(e.GetArg("position")); var role = ResolvePos(e.GetArg("position"));
var resolvedRole = role; var resolvedRole = role;
var name = e.GetArg("champ").Replace(" ", "").ToLower(); var name = e.GetArg("champ").Replace(" ", "").ToLower();
CachedChampion champ = null; CachedChampion champ = null;
lock (cacheLock) { lock (cacheLock)
{
CachedChampionImages.TryGetValue(name + "_" + resolvedRole, out champ); CachedChampionImages.TryGetValue(name + "_" + resolvedRole, out champ);
} }
if (champ != null) { if (champ != null)
{
champ.ImageStream.Position = 0; champ.ImageStream.Position = 0;
await e.Channel.SendFile("champ.png", champ.ImageStream); await e.Channel.SendFile("champ.png", champ.ImageStream);
return; return;
} }
var allData = JArray.Parse(await Classes.SearchHelper.GetResponseStringAsync($"http://api.champion.gg/champion/{name}?api_key={NadekoBot.Creds.LOLAPIKey}")); var allData = JArray.Parse(await Classes.SearchHelper.GetResponseStringAsync($"http://api.champion.gg/champion/{name}?api_key={NadekoBot.Creds.LOLAPIKey}"));
JToken data = null; JToken data = null;
if (role != null) { if (role != null)
for (var i = 0; i < allData.Count; i++) { {
if (allData[i]["role"].ToString().Equals(role)) { for (var i = 0; i < allData.Count; i++)
{
if (allData[i]["role"].ToString().Equals(role))
{
data = allData[i]; data = allData[i];
break; break;
} }
} }
if (data == null) { if (data == null)
{
await e.Channel.SendMessage("💢 Data for that role does not exist."); await e.Channel.SendMessage("💢 Data for that role does not exist.");
return; return;
} }
} else { }
else {
data = allData[0]; data = allData[0];
role = allData[0]["role"].ToString(); role = allData[0]["role"].ToString();
resolvedRole = ResolvePos(role); resolvedRole = ResolvePos(role);
} }
lock (cacheLock) { lock (cacheLock)
{
CachedChampionImages.TryGetValue(name + "_" + resolvedRole, out champ); CachedChampionImages.TryGetValue(name + "_" + resolvedRole, out champ);
} }
if (champ != null) { if (champ != null)
{
Console.WriteLine("Sending lol image from cache."); Console.WriteLine("Sending lol image from cache.");
champ.ImageStream.Position = 0; champ.ImageStream.Position = 0;
await e.Channel.SendFile("champ.png", champ.ImageStream); await e.Channel.SendFile("champ.png", champ.ImageStream);
@ -106,7 +127,8 @@ namespace NadekoBot.Commands {
//name = data["title"].ToString(); //name = data["title"].ToString();
// get all possible roles, and "select" the shown one // get all possible roles, and "select" the shown one
var roles = new string[allData.Count]; var roles = new string[allData.Count];
for (var i = 0; i < allData.Count; i++) { for (var i = 0; i < allData.Count; i++)
{
roles[i] = allData[i]["role"].ToString(); roles[i] = allData[i]["role"].ToString();
if (roles[i] == role) if (roles[i] == role)
roles[i] = ">" + roles[i] + "<"; roles[i] = ">" + roles[i] + "<";
@ -114,14 +136,16 @@ namespace NadekoBot.Commands {
var general = JArray.Parse(await SearchHelper.GetResponseStringAsync($"http://api.champion.gg/stats/" + var general = JArray.Parse(await SearchHelper.GetResponseStringAsync($"http://api.champion.gg/stats/" +
$"champs/{name}?api_key={NadekoBot.Creds.LOLAPIKey}")) $"champs/{name}?api_key={NadekoBot.Creds.LOLAPIKey}"))
.FirstOrDefault(jt => jt["role"].ToString() == role)?["general"]; .FirstOrDefault(jt => jt["role"].ToString() == role)?["general"];
if (general == null) { if (general == null)
{
Console.WriteLine("General is null."); Console.WriteLine("General is null.");
return; return;
} }
//get build data for this role //get build data for this role
var buildData = data["items"]["mostGames"]["items"]; var buildData = data["items"]["mostGames"]["items"];
var items = new string[6]; var items = new string[6];
for (var i = 0; i < 6; i++) { for (var i = 0; i < 6; i++)
{
items[i] = buildData[i]["id"].ToString(); items[i] = buildData[i]["id"].ToString();
} }
@ -146,7 +170,8 @@ namespace NadekoBot.Commands {
var orderArr = (data["skills"]["mostGames"]["order"] as JArray); var orderArr = (data["skills"]["mostGames"]["order"] as JArray);
var img = Image.FromFile("data/lol/bg.png"); var img = Image.FromFile("data/lol/bg.png");
using (var g = Graphics.FromImage(img)) { using (var g = Graphics.FromImage(img))
{
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
//g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy; //g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy;
const int margin = 5; const int margin = 5;
@ -166,12 +191,14 @@ namespace NadekoBot.Commands {
//draw skill order //draw skill order
float orderFormula = 120 / orderArr.Count; float orderFormula = 120 / orderArr.Count;
const float orderVerticalSpacing = 10; const float orderVerticalSpacing = 10;
for (var i = 0; i < orderArr.Count; i++) { for (var i = 0; i < orderArr.Count; i++)
{
var orderX = margin + margin + imageSize + orderFormula * i + i; var orderX = margin + margin + imageSize + orderFormula * i + i;
float orderY = margin + 35; float orderY = margin + 35;
var spellName = orderArr[i].ToString().ToLowerInvariant(); var spellName = orderArr[i].ToString().ToLowerInvariant();
switch (spellName) { switch (spellName)
{
case "w": case "w":
orderY += orderVerticalSpacing; orderY += orderVerticalSpacing;
break; break;
@ -206,7 +233,8 @@ Assists: {general["assists"]} Ban: {general["banRate"]}%
g.DrawString($"Best against", smallFont, Brushes.WhiteSmoke, margin, img.Height - imageSize + margin); g.DrawString($"Best against", smallFont, Brushes.WhiteSmoke, margin, img.Height - imageSize + margin);
var smallImgSize = 50; var smallImgSize = 50;
for (var i = 0; i < counters.Length; i++) { for (var i = 0; i < counters.Length; i++)
{
g.DrawImage(GetImage(counters[i]), g.DrawImage(GetImage(counters[i]),
new Rectangle(i * (smallImgSize + margin) + margin, img.Height - smallImgSize - margin, new Rectangle(i * (smallImgSize + margin) + margin, img.Height - smallImgSize - margin,
smallImgSize, smallImgSize,
@ -215,7 +243,8 @@ Assists: {general["assists"]} Ban: {general["banRate"]}%
//draw countered by //draw countered by
g.DrawString($"Worst against", smallFont, Brushes.WhiteSmoke, img.Width - 3 * (smallImgSize + margin), img.Height - imageSize + margin); g.DrawString($"Worst against", smallFont, Brushes.WhiteSmoke, img.Width - 3 * (smallImgSize + margin), img.Height - imageSize + margin);
for (var i = 0; i < countered.Length; i++) { for (var i = 0; i < countered.Length; i++)
{
var j = countered.Length - i; var j = countered.Length - i;
g.DrawImage(GetImage(countered[i]), g.DrawImage(GetImage(countered[i]),
new Rectangle(img.Width - (j * (smallImgSize + margin) + margin), img.Height - smallImgSize - margin, new Rectangle(img.Width - (j * (smallImgSize + margin) + margin), img.Height - smallImgSize - margin,
@ -225,7 +254,8 @@ Assists: {general["assists"]} Ban: {general["banRate"]}%
//draw item build //draw item build
g.DrawString("Popular build", normalFont, Brushes.WhiteSmoke, img.Width - (3 * (smallImgSize + margin) + margin), 77); g.DrawString("Popular build", normalFont, Brushes.WhiteSmoke, img.Width - (3 * (smallImgSize + margin) + margin), 77);
for (var i = 0; i < 6; i++) { for (var i = 0; i < 6; i++)
{
var inverseI = 5 - i; var inverseI = 5 - i;
var j = inverseI % 3 + 1; var j = inverseI % 3 + 1;
var k = inverseI / 3; var k = inverseI / 3;
@ -238,18 +268,23 @@ Assists: {general["assists"]} Ban: {general["banRate"]}%
var cachedChamp = new CachedChampion { AddedAt = DateTime.Now, ImageStream = img.ToStream(System.Drawing.Imaging.ImageFormat.Png), Name = name.ToLower() + "_" + resolvedRole }; var cachedChamp = new CachedChampion { AddedAt = DateTime.Now, ImageStream = img.ToStream(System.Drawing.Imaging.ImageFormat.Png), Name = name.ToLower() + "_" + resolvedRole };
CachedChampionImages.Add(cachedChamp.Name, cachedChamp); CachedChampionImages.Add(cachedChamp.Name, cachedChamp);
await e.Channel.SendFile(data["title"] + "_stats.png", cachedChamp.ImageStream); await e.Channel.SendFile(data["title"] + "_stats.png", cachedChamp.ImageStream);
} catch { }
catch (Exception ex)
{
Console.WriteLine(ex);
await e.Channel.SendMessage("💢 Failed retreiving data for that champion."); await e.Channel.SendMessage("💢 Failed retreiving data for that champion.");
} }
}); });
cgb.CreateCommand(Module.Prefix + "lolban") cgb.CreateCommand(Module.Prefix + "lolban")
.Description("Shows top 6 banned champions ordered by ban rate. Ban these champions and you will be Plat 5 in no time.") .Description("Shows top 6 banned champions ordered by ban rate. Ban these champions and you will be Plat 5 in no time.")
.Do(async e => { .Do(async e =>
{
var showCount = 6; var showCount = 6;
//http://api.champion.gg/stats/champs/mostBanned?api_key=YOUR_API_TOKEN&page=1&limit=2 //http://api.champion.gg/stats/champs/mostBanned?api_key=YOUR_API_TOKEN&page=1&limit=2
try { try
{
var data = JObject.Parse( var data = JObject.Parse(
await Classes await Classes
.SearchHelper .SearchHelper
@ -260,7 +295,8 @@ Assists: {general["assists"]} Ban: {general["banRate"]}%
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendLine($"**Showing {showCount} top banned champions.**"); sb.AppendLine($"**Showing {showCount} top banned champions.**");
sb.AppendLine($"`{trashTalk[new Random().Next(0, trashTalk.Length)]}`"); sb.AppendLine($"`{trashTalk[new Random().Next(0, trashTalk.Length)]}`");
for (var i = 0; i < data.Count; i++) { for (var i = 0; i < data.Count; i++)
{
if (i % 2 == 0 && i != 0) if (i % 2 == 0 && i != 0)
sb.AppendLine(); sb.AppendLine();
sb.Append($"`{i + 1}.` **{data[i]["name"]}** "); sb.Append($"`{i + 1}.` **{data[i]["name"]}** ");
@ -268,34 +304,44 @@ Assists: {general["assists"]} Ban: {general["banRate"]}%
} }
await e.Channel.SendMessage(sb.ToString()); await e.Channel.SendMessage(sb.ToString());
} catch (Exception ex) { }
catch (Exception ex)
{
await e.Channel.SendMessage($":anger: Fail: Champion.gg didsabled ban data until next patch. Sorry for the inconvenience."); await e.Channel.SendMessage($":anger: Fail: Champion.gg didsabled ban data until next patch. Sorry for the inconvenience.");
} }
}); });
} }
private enum GetImageType { private enum GetImageType
{
Champion, Champion,
Item Item
} }
private static Image GetImage(string id, GetImageType imageType = GetImageType.Champion) { private static Image GetImage(string id, GetImageType imageType = GetImageType.Champion)
try { {
switch (imageType) { try
{
switch (imageType)
{
case GetImageType.Champion: case GetImageType.Champion:
return Image.FromFile($"data/lol/champions/{id}.png"); return Image.FromFile($"data/lol/champions/{id}.png");
case GetImageType.Item: case GetImageType.Item:
default: default:
return Image.FromFile($"data/lol/items/{id}.png"); return Image.FromFile($"data/lol/items/{id}.png");
} }
} catch (Exception) { }
catch (Exception)
{
return Image.FromFile("data/lol/_ERROR.png"); return Image.FromFile("data/lol/_ERROR.png");
} }
} }
private static string ResolvePos(string pos) { private static string ResolvePos(string pos)
{
if (string.IsNullOrWhiteSpace(pos)) if (string.IsNullOrWhiteSpace(pos))
return null; return null;
switch (pos.ToLowerInvariant()) { switch (pos.ToLowerInvariant())
{
case "m": case "m":
case "mid": case "mid":
case "midorfeed": case "midorfeed":

View File

@ -1,18 +1,17 @@
using Discord; using Discord;
using Discord.Commands; using Discord.Commands;
using Discord.Modules; using Discord.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;
using NadekoBot.Classes; using NadekoBot.Classes;
using NadekoBot.Commands;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Properties; using NadekoBot.Properties;
using NadekoBot.Commands; using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace NadekoBot.Modules namespace NadekoBot.Modules
{ {

View File

@ -2,7 +2,7 @@
######You can donate on paypal: `nadekodiscordbot@gmail.com` or Bitcoin `17MZz1JAqME39akMLrVT4XBPffQJ2n1EPa` ######You can donate on paypal: `nadekodiscordbot@gmail.com` or Bitcoin `17MZz1JAqME39akMLrVT4XBPffQJ2n1EPa`
#NadekoBot List Of Commands #NadekoBot List Of Commands
Version: `NadekoBot v0.9.5925.41065` Version: `NadekoBot v0.9.5930.23184`
### Administration ### Administration
Command and aliases | Description | Usage Command and aliases | Description | Usage
----------------|--------------|------- ----------------|--------------|-------
@ -13,9 +13,9 @@ Command and aliases | Description | Usage
`.byepm` | Toggles whether the good bye messages will be sent in a PM or in the text channel. `.byepm` | Toggles whether the good bye messages will be sent in a PM or in the text channel.
`.greetpm` | Toggles whether the greet messages will be sent in a PM or in the text channel. `.greetpm` | Toggles whether the greet messages will be sent in a PM or in the text channel.
`.spmom` | Toggles whether mentions of other offline users on your server will send a pm to them. `.spmom` | Toggles whether mentions of other offline users on your server will send a pm to them.
`.logserver` | Toggles logging in this channel. Logs every message sent/deleted/edited on the server. BOT OWNER ONLY. SERVER OWNER ONLY. `.logserver` | Toggles logging in this channel. Logs every message sent/deleted/edited on the server. **Owner Only!**
`.userpresence` | Starts logging to this channel when someone from the server goes online/offline/idle. BOT OWNER ONLY. SERVER OWNER ONLY. `.userpresence` | Starts logging to this channel when someone from the server goes online/offline/idle. **Owner Only!**
`.voicepresence` | Toggles logging to this channel whenever someone joins or leaves a voice channel you are in right now. BOT OWNER ONLY. SERVER OWNER ONLY. `.voicepresence` | Toggles logging to this channel whenever someone joins or leaves a voice channel you are in right now. **Owner Only!**
`.repeat` | Repeat a message every X minutes. If no parameters are specified, repeat is disabled. Requires manage messages. `.repeat` | Repeat a message every X minutes. If no parameters are specified, repeat is disabled. Requires manage messages.
`.rotateplaying`, `.ropl` | Toggles rotation of playing status of the dynamic strings you specified earlier. `.rotateplaying`, `.ropl` | Toggles rotation of playing status of the dynamic strings you specified earlier.
`.addplaying`, `.adpl` | Adds a specified string to the list of playing strings to rotate. Supported placeholders: %servers%, %users%, %playing%, %queued%, %trivia% `.addplaying`, `.adpl` | Adds a specified string to the list of playing strings to rotate. Supported placeholders: %servers%, %users%, %playing%, %queued%, %trivia%
@ -77,7 +77,7 @@ Command and aliases | Description | Usage
Command and aliases | Description | Usage Command and aliases | Description | Usage
----------------|--------------|------- ----------------|--------------|-------
`-h`, `-help`, `@BotName help`, `@BotName h`, `~h` | Either shows a help for a single command, or PMs you help link if no arguments are specified. | '-h !m q' or just '-h' `-h`, `-help`, `@BotName help`, `@BotName h`, `~h` | Either shows a help for a single command, or PMs you help link if no arguments are specified. | '-h !m q' or just '-h'
`-hgit` | OWNER ONLY commandlist.md file generation. `-hgit` | Generates the commandlist.md file. **Owner Only!**
`-readme`, `-guide` | Sends a readme and a guide links to the channel. `-readme`, `-guide` | Sends a readme and a guide links to the channel.
`-donate`, `~donate` | Instructions for helping the project! `-donate`, `~donate` | Instructions for helping the project!
`-modules`, `.modules` | List all bot modules. `-modules`, `.modules` | List all bot modules.
@ -114,16 +114,19 @@ Command and aliases | Description | Usage
`;arm`, `;allrolemodules` | Sets permissions for all modules at the role level. | ;arm [enable/disable] [role_name] `;arm`, `;allrolemodules` | Sets permissions for all modules at the role level. | ;arm [enable/disable] [role_name]
`;arc`, `;allrolecommands` | Sets permissions for all commands from a certain module at the role level. | ;arc [module_name] [enable/disable] [role_name] `;arc`, `;allrolecommands` | Sets permissions for all commands from a certain module at the role level. | ;arc [module_name] [enable/disable] [role_name]
`;ubl` | Blacklists a mentioned user. | ;ubl [user_mention] `;ubl` | Blacklists a mentioned user. | ;ubl [user_mention]
`;uubl`, `;unblacklist` | Unblacklists a mentioned user. | ;uubl [user_mention] `;uubl` | Unblacklists a mentioned user. | ;uubl [user_mention]
`;cbl` | Blacklists a mentioned channel (#general for example). | ;ubl [channel_mention] `;cbl` | Blacklists a mentioned channel (#general for example). | ;ubl [channel_mention]
`;cubl` | Unblacklists a mentioned channel (#general for example). | ;cubl [channel_mention]
`;sbl` | Blacklists a server by a name or id (#general for example). **BOT OWNER ONLY** | ;usl [servername/serverid] `;sbl` | Blacklists a server by a name or id (#general for example). **BOT OWNER ONLY** | ;usl [servername/serverid]
### Conversations ### Conversations
Command and aliases | Description | Usage Command and aliases | Description | Usage
----------------|--------------|------- ----------------|--------------|-------
`e` | You did it. `e` | You did it.
`comeatmebro` | Come at me bro (ง’̀-‘́)ง | comeatmebro {target}
`\o\` | Nadeko replies with /o/ `\o\` | Nadeko replies with /o/
`/o/` | Nadeko replies with \o\ `/o/` | Nadeko replies with \o\
`moveto` | Suggests moving the conversation. | moveto #spam
`..` | Adds a new quote with the specified name (single word) and message (no limit). | .. abc My message `..` | Adds a new quote with the specified name (single word) and message (no limit). | .. abc My message
`...` | Shows a random quote with a specified name. | .. abc `...` | Shows a random quote with a specified name. | .. abc
`@BotName copyme`, `@BotName cm` | Nadeko starts copying everything you say. Disable with cs `@BotName copyme`, `@BotName cm` | Nadeko starts copying everything you say. Disable with cs
@ -155,7 +158,7 @@ Command and aliases | Description | Usage
`@BotName dump` | Dumps all of the invites it can to dump.txt.** Owner Only.** `@BotName dump` | Dumps all of the invites it can to dump.txt.** Owner Only.**
`@BotName ab` | Try to get 'abalabahaha' `@BotName ab` | Try to get 'abalabahaha'
`@BotName av`, `@BotName avatar` | Shows a mentioned person's avatar. | ~av @X `@BotName av`, `@BotName avatar` | Shows a mentioned person's avatar. | ~av @X
`@BotName leet` | Convert your text to leetspeak. Level is a number 1-6. | @BotName leet [level] [Your text here] `@BotName leet` |
### Gambling ### Gambling
Command and aliases | Description | Usage Command and aliases | Description | Usage
@ -167,6 +170,7 @@ Command and aliases | Description | Usage
`$nroll` | Rolls in a given range. | `$nroll 5` (rolls 0-5) or `$nroll 5-15` `$nroll` | Rolls in a given range. | `$nroll 5` (rolls 0-5) or `$nroll 5-15`
`$raffle` | Prints a name and ID of a random user from the online list from the (optional) role. `$raffle` | Prints a name and ID of a random user from the online list from the (optional) role.
`$$$` | Check how many NadekoFlowers you have. `$$$` | Check how many NadekoFlowers you have.
`$give` | Give someone a certain amount of flowers
### Games ### Games
Command and aliases | Description | Usage Command and aliases | Description | Usage
@ -202,14 +206,14 @@ Command and aliases | Description | Usage
`!m max` | Sets the music volume to 100% (real max is actually 150%). `!m max` | Sets the music volume to 100% (real max is actually 150%).
`!m half` | Sets the music volume to 50%. `!m half` | Sets the music volume to 50%.
`!m sh` | Shuffles the current playlist. `!m sh` | Shuffles the current playlist.
`!m setgame` | Sets the game of the bot to the number of songs playing.**Owner only** `!m setgame` | Sets the game of the bot to the number of songs playing. **Owner only**
`!m pl` | Queues up to 25 songs from a youtube playlist specified by a link, or keywords. `!m pl` | Queues up to 25 songs from a youtube playlist specified by a link, or keywords.
`!m lopl` | Queues up to 50 songs from a directory. `!m lopl` | Queues up to 50 songs from a directory. **Owner Only!**
`!m radio`, `!m ra` | Queues a direct radio stream from a link. `!m radio`, `!m ra` | Queues a direct radio stream from a link.
`!m lo` | Queues a local file by specifying a full path. BOT OWNER ONLY. `!m lo` | Queues a local file by specifying a full path. **Owner Only!**
`!m mv` | Moves the bot to your voice channel. (works only if music is already playing) `!m mv` | Moves the bot to your voice channel. (works only if music is already playing)
`!m rm` | Remove a song by its # in the queue, or 'all' to remove whole queue. `!m rm` | Remove a song by its # in the queue, or 'all' to remove whole queue.
`!m cleanup` | Cleans up hanging voice connections. BOT OWNER ONLY `!m cleanup` | Cleans up hanging voice connections. **Owner Only!**
### Searches ### Searches
Command and aliases | Description | Usage Command and aliases | Description | Usage
@ -223,6 +227,7 @@ Command and aliases | Description | Usage
`~we` | Shows weather data for a specified city and a country BOTH ARE REQUIRED. Weather api is very random if you make a mistake. `~we` | Shows weather data for a specified city and a country BOTH ARE REQUIRED. Weather api is very random if you make a mistake.
`~yt` | Searches youtubes and shows the first result `~yt` | Searches youtubes and shows the first result
`~ani`, `~anime`, `~aq` | Queries anilist for an anime and shows the first result. `~ani`, `~anime`, `~aq` | Queries anilist for an anime and shows the first result.
`~imdb` | Queries imdb for movies or series, show first result.
`~mang`, `~manga`, `~mq` | Queries anilist for a manga and shows the first result. `~mang`, `~manga`, `~mq` | Queries anilist for a manga and shows the first result.
`~randomcat` | Shows a random cat image. `~randomcat` | Shows a random cat image.
`~i` | Pulls the first image found using a search parameter. Use ~ir for different results. | ~i cute kitten `~i` | Pulls the first image found using a search parameter. Use ~ir for different results. | ~i cute kitten
@ -234,6 +239,12 @@ Command and aliases | Description | Usage
`~#` | Searches Tagdef.com for a hashtag. | ~# ff `~#` | Searches Tagdef.com for a hashtag. | ~# ff
`~quote` | Shows a random quote. `~quote` | Shows a random quote.
### Translator
Command and aliases | Description | Usage
----------------|--------------|-------
`~trans` | Translates from>to text. From the given language to the destiation language.
`~translangs` | List the valid languages for translation.
### NSFW ### NSFW
Command and aliases | Description | Usage Command and aliases | Description | Usage
----------------|--------------|------- ----------------|--------------|-------