more work, repo DOES NOT BUILD

This commit is contained in:
Master Kwoth
2016-03-01 12:44:30 +01:00
parent 874eefdf89
commit 1f2b9cd3d3
32 changed files with 194 additions and 224 deletions

@ -15,9 +15,9 @@ using NadekoBot.Properties;
using NadekoBot.Commands;
namespace NadekoBot.Modules {
class Conversations : DiscordModule {
internal class Conversations : DiscordModule {
private string firestr = "🔥 ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้ 🔥";
public Conversations() : base() {
public Conversations() {
commands.Add(new CopyCommand());
commands.Add(new RequestsCommand());
}

@ -1,14 +1,11 @@
using Discord.Modules;
using System.Collections.Generic;
namespace NadekoBot.Modules
{
abstract class DiscordModule : IModule
{
public List<DiscordCommand> commands;
namespace NadekoBot.Modules {
internal abstract class DiscordModule : IModule {
protected List<DiscordCommand> commands = new List<DiscordCommand>();
protected DiscordModule() {
commands = new List<DiscordCommand>();
}
public abstract void Install(ModuleManager manager);

@ -2,10 +2,11 @@
using Discord.Modules;
using NadekoBot.Extensions;
using System.Linq;
using Discord;
namespace NadekoBot.Modules
{
class Gambling : DiscordModule
internal class Gambling : DiscordModule
{
public Gambling() {
@ -33,33 +34,16 @@ namespace NadekoBot.Modules
return;
}
var members = role.Members.Where(u => u.Status == Discord.UserStatus.Online); // only online
try {
var usr = members.ToArray()[new System.Random().Next(0, members.Count())];
await e.Channel.SendMessage($"**Raffled user:** {usr.Name} (id: {usr.Id})");
}
catch { }
var membersArray = members as User[] ?? members.ToArray();
var usr = membersArray[new System.Random().Next(0, membersArray.Length)];
await e.Channel.SendMessage($"**Raffled user:** {usr.Name} (id: {usr.Id})");
});
/*
cgb.CreateCommand("$$")
.Description("Add moneyz")
.Parameter("val", ParameterType.Required)
.Do(e => {
var arg = e.GetArg("val");
var num = int.Parse(arg);
Classes.DBHandler.Instance.InsertData(
new Classes._DataModels.CurrencyTransaction {
Value = num,
Reason = "Money plz",
UserId = (long)e.User.Id,
});
});
*/
cgb.CreateCommand("$$$")
.Description("Check how many NadekoFlowers you have.")
.Do(async e => {
var pts = Classes.DBHandler.Instance.GetStateByUserId((long)e.User.Id)?.Value ?? 0;
string str = $"`You have {pts} NadekoFlowers".SnPl((int)pts)+"`\n";
for (int i = 0; i < pts; i++) {
var str = $"`You have {pts} NadekoFlowers".SnPl((int)pts)+"`\n";
for (var i = 0; i < pts; i++) {
str += "🌸";
}
await e.Channel.SendMessage(str);

@ -6,14 +6,12 @@ using Newtonsoft.Json.Linq;
using System.IO;
//🃏
//🏁
namespace NadekoBot.Modules
{
class Games : DiscordModule
{
private string[] _8BallAnswers;
private Random _r = new Random();
namespace NadekoBot.Modules {
internal class Games : DiscordModule {
private readonly string[] _8BallAnswers;
private Random rng = new Random();
public Games() : base() {
public Games() {
commands.Add(new Trivia());
commands.Add(new SpeedTyping());
commands.Add(new PollCommand());
@ -22,8 +20,7 @@ namespace NadekoBot.Modules
_8BallAnswers = JArray.Parse(File.ReadAllText("data/8ball.json")).Select(t => t.ToString()).ToArray();
}
public override void Install(ModuleManager manager)
{
public override void Install(ModuleManager manager) {
manager.CreateCommands("", cgb => {
cgb.AddCheck(Classes.Permissions.PermissionChecker.Instance);
@ -40,39 +37,35 @@ namespace NadekoBot.Modules
var list = arg.Split(';');
if (list.Count() < 2)
return;
await e.Channel.SendMessage(list[new Random().Next(0, list.Length)]);
await e.Channel.SendMessage(list[rng.Next(0, list.Length)]);
});
cgb.CreateCommand(">8ball")
.Description("Ask the 8ball a yes/no question.")
.Parameter("question",Discord.Commands.ParameterType.Unparsed)
.Parameter("question", Discord.Commands.ParameterType.Unparsed)
.Do(async e => {
string question = e.GetArg("question");
var question = e.GetArg("question");
if (string.IsNullOrWhiteSpace(question))
return;
try {
await e.Channel.SendMessage(
$":question: **Question**: `{question}` \n:crystal_ball: **8Ball Answers**: `{_8BallAnswers[new Random().Next(0, _8BallAnswers.Length)]}`");
}
catch { }
$":question: **Question**: `{question}` \n:crystal_ball: **8Ball Answers**: `{_8BallAnswers[rng.Next(0, _8BallAnswers.Length)]}`");
} catch { }
});
cgb.CreateCommand(">")
.Description("Attack a person. Supported attacks: 'splash', 'strike', 'burn', 'surge'.\n**Usage**: > strike @User")
.Parameter("attack_type",Discord.Commands.ParameterType.Required)
.Parameter("target",Discord.Commands.ParameterType.Required)
.Do(async e =>
{
.Parameter("attack_type", Discord.Commands.ParameterType.Required)
.Parameter("target", Discord.Commands.ParameterType.Required)
.Do(async e => {
var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault();
var usrType = GetType(usr.Id);
string response = "";
int dmg = GetDamage(usrType, e.GetArg("attack_type").ToLowerInvariant());
var response = "";
var dmg = GetDamage(usrType, e.GetArg("attack_type").ToLowerInvariant());
response = e.GetArg("attack_type") + (e.GetArg("attack_type") == "splash" ? "es " : "s ") + $"{usr.Mention}{GetImage(usrType)} for {dmg}\n";
if (dmg >= 65)
{
if (dmg >= 65) {
response += "It's super effective!";
}
else if (dmg <= 35) {
} else if (dmg <= 35) {
response += "Ineffective!";
}
await e.Channel.SendMessage($"{ e.User.Mention }{GetImage(GetType(e.User.Id))} {response}");
@ -81,11 +74,11 @@ namespace NadekoBot.Modules
cgb.CreateCommand("poketype")
.Parameter("target", Discord.Commands.ParameterType.Required)
.Description("Gets the users element type. Use this to do more damage with strike!")
.Do(async e =>
{
.Do(async e => {
var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault();
if (usr == null) {
await e.Channel.SendMessage("No such person.");
return;
}
var t = GetType(usr.Id);
await e.Channel.SendMessage($"{usr.Name}'s type is {GetImage(t)} {t}");
@ -104,7 +97,8 @@ namespace NadekoBot.Modules
🐛 Insect
🌟 or 💫 or ✨ Fairy
*/
string GetImage(PokeType t) {
private string GetImage(PokeType t) {
switch (t) {
case PokeType.WATER:
return "💦";
@ -119,11 +113,9 @@ namespace NadekoBot.Modules
}
}
private int GetDamage(PokeType targetType, string v)
{
private int GetDamage(PokeType targetType, string v) {
var rng = new Random();
switch (v)
{
switch (v) {
case "splash": //water
if (targetType == PokeType.FIRE)
return rng.Next(65, 100);
@ -166,21 +158,16 @@ namespace NadekoBot.Modules
var remainder = id % 10;
if (remainder < 3)
return PokeType.WATER;
else if (remainder >= 3 && remainder < 5)
{
else if (remainder >= 3 && remainder < 5) {
return PokeType.GRASS;
}
else if (remainder >= 5 && remainder < 8)
{
} else if (remainder >= 5 && remainder < 8) {
return PokeType.FIRE;
}
else {
} else {
return PokeType.ELECTRICAL;
}
}
private enum PokeType
{
private enum PokeType {
WATER, GRASS, FIRE, ELECTRICAL
}
}

@ -3,9 +3,9 @@ using Discord.Modules;
using Discord.Commands;
namespace NadekoBot.Modules {
class Help : DiscordModule {
internal class Help : DiscordModule {
public Help() : base() {
public Help() {
commands.Add(new HelpCommand());
}

@ -11,16 +11,16 @@ using System.Threading.Tasks;
using Timer = System.Timers.Timer;
namespace NadekoBot.Modules {
class Music : DiscordModule {
internal class Music : DiscordModule {
public static ConcurrentDictionary<Server, MusicPlayer> musicPlayers = new ConcurrentDictionary<Server, MusicPlayer>();
public static ConcurrentDictionary<ulong, float> defaultMusicVolumes = new ConcurrentDictionary<ulong, float>();
Timer setgameTimer => new Timer();
private Timer setgameTimer => new Timer();
bool setgameEnabled = false;
private bool setgameEnabled = false;
public Music() : base() {
public Music() {
setgameTimer.Interval = 20000;
setgameTimer.Elapsed += (s, e) => {

@ -5,11 +5,11 @@ using Newtonsoft.Json.Linq;
using NadekoBot.Classes;
namespace NadekoBot.Modules {
class NSFW : DiscordModule {
internal class NSFW : DiscordModule {
private Random _r = new Random();
public NSFW() : base() {
public NSFW() {
}

@ -6,9 +6,10 @@ using PermsHandler = NadekoBot.Classes.Permissions.PermissionsHandler;
using System.Linq;
namespace NadekoBot.Modules {
class PermissionModule : DiscordModule {
string prefix = ";";
public PermissionModule() : base() {
internal class PermissionModule : DiscordModule {
private const string prefix = ";";
public PermissionModule() {
//Empty for now
}
@ -135,7 +136,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand(prefix + "sm").Alias(prefix + "servermodule")
.Parameter("module", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Description("Sets a module's permission at the server level.\n**Usage**: ;sm <module_name> enable")
.Description("Sets a module's permission at the server level.\n**Usage**: ;sm [module_name] enable")
.Do(async e => {
try {
string module = PermissionHelper.ValidateModule(e.GetArg("module"));
@ -155,7 +156,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand(prefix + "sc").Alias(prefix + "servercommand")
.Parameter("command", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Description("Sets a command's permission at the server level.\n**Usage**: ;sc <command_name> disable")
.Description("Sets a command's permission at the server level.\n**Usage**: ;sc [command_name] disable")
.Do(async e => {
try {
string command = PermissionHelper.ValidateCommand(e.GetArg("command"));
@ -176,7 +177,7 @@ namespace NadekoBot.Modules {
.Parameter("module", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("role", ParameterType.Unparsed)
.Description("Sets a module's permission at the role level.\n**Usage**: ;rm <module_name> enable <role_name>")
.Description("Sets a module's permission at the role level.\n**Usage**: ;rm [module_name] enable [role_name]")
.Do(async e => {
try {
string module = PermissionHelper.ValidateModule(e.GetArg("module"));
@ -207,7 +208,7 @@ namespace NadekoBot.Modules {
.Parameter("command", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("role", ParameterType.Unparsed)
.Description("Sets a command's permission at the role level.\n**Usage**: ;rc <command_name> disable <role_name>")
.Description("Sets a command's permission at the role level.\n**Usage**: ;rc [command_name] disable [role_name]")
.Do(async e => {
try {
string command = PermissionHelper.ValidateCommand(e.GetArg("command"));
@ -238,7 +239,7 @@ namespace NadekoBot.Modules {
.Parameter("module", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("channel", ParameterType.Unparsed)
.Description("Sets a module's permission at the channel level.\n**Usage**: ;cm <module_name> enable <channel_name>")
.Description("Sets a module's permission at the channel level.\n**Usage**: ;cm [module_name] enable [channel_name]")
.Do(async e => {
try {
string module = PermissionHelper.ValidateModule(e.GetArg("module"));
@ -269,7 +270,7 @@ namespace NadekoBot.Modules {
.Parameter("command", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("channel", ParameterType.Unparsed)
.Description("Sets a command's permission at the channel level.\n**Usage**: ;cm enable <channel_name>")
.Description("Sets a command's permission at the channel level.\n**Usage**: ;cc [command_name] enable [channel_name]")
.Do(async e => {
try {
string command = PermissionHelper.ValidateCommand(e.GetArg("command"));
@ -300,7 +301,7 @@ namespace NadekoBot.Modules {
.Parameter("module", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("user", ParameterType.Unparsed)
.Description("Sets a module's permission at the user level.\n**Usage**: ;um <module_name> enable <user_name>")
.Description("Sets a module's permission at the user level.\n**Usage**: ;um [module_name] enable [user_name]")
.Do(async e => {
try {
string module = PermissionHelper.ValidateModule(e.GetArg("module"));
@ -322,7 +323,7 @@ namespace NadekoBot.Modules {
.Parameter("command", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("user", ParameterType.Unparsed)
.Description("Sets a command's permission at the user level.\n**Usage**: ;uc <module_command> enable <user_name>")
.Description("Sets a command's permission at the user level.\n**Usage**: ;uc [command_name] enable [user_name]")
.Do(async e => {
try {
string command = PermissionHelper.ValidateCommand(e.GetArg("command"));
@ -342,7 +343,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand(prefix + "asm").Alias(prefix + "allservermodules")
.Parameter("bool", ParameterType.Required)
.Description("Sets permissions for all modules at the server level.\n**Usage**: ;asm <enable/disable>")
.Description("Sets permissions for all modules at the server level.\n**Usage**: ;asm [enable/disable]")
.Do(async e => {
try {
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));
@ -363,7 +364,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand(prefix + "asc").Alias(prefix + "allservercommands")
.Parameter("module", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Description("Sets permissions for all commands from a certain module at the server level.\n**Usage**: ;asc <module_name> <enable/disable>")
.Description("Sets permissions for all commands from a certain module at the server level.\n**Usage**: ;asc [module_name] [enable/disable]")
.Do(async e => {
try {
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));
@ -385,7 +386,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand(prefix + "acm").Alias(prefix + "allchannelmodules")
.Parameter("bool", ParameterType.Required)
.Parameter("channel", ParameterType.Unparsed)
.Description("Sets permissions for all modules at the channel level.\n**Usage**: ;acm <enable/disable> <channel_name>")
.Description("Sets permissions for all modules at the channel level.\n**Usage**: ;acm [enable/disable] [channel_name]")
.Do(async e => {
try {
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));
@ -408,7 +409,7 @@ namespace NadekoBot.Modules {
.Parameter("module", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("channel", ParameterType.Unparsed)
.Description("Sets permissions for all commands from a certain module at the channel level.\n**Usage**: ;acc <module_name> <enable/disable> <channel_name>")
.Description("Sets permissions for all commands from a certain module at the channel level.\n**Usage**: ;acc [module_name] [enable/disable] [channel_name]")
.Do(async e => {
try {
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));
@ -430,7 +431,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand(prefix + "arm").Alias(prefix + "allrolemodules")
.Parameter("bool", ParameterType.Required)
.Parameter("role", ParameterType.Unparsed)
.Description("Sets permissions for all modules at the role level.\n**Usage**: ;arm <enable/disable> <role_name>")
.Description("Sets permissions for all modules at the role level.\n**Usage**: ;arm [enable/disable] [role_name]")
.Do(async e => {
try {
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));
@ -453,7 +454,7 @@ namespace NadekoBot.Modules {
.Parameter("module", ParameterType.Required)
.Parameter("bool", ParameterType.Required)
.Parameter("channel", ParameterType.Unparsed)
.Description("Sets permissions for all commands from a certain module at the role level.\n**Usage**: ;arc <module_name> <enable/disable> <channel_name>")
.Description("Sets permissions for all commands from a certain module at the role level.\n**Usage**: ;arc [module_name] [enable/disable] [channel_name]")
.Do(async e => {
try {
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));

@ -10,16 +10,14 @@ using NadekoBot.Classes;
using NadekoBot.Commands;
namespace NadekoBot.Modules {
class Searches : DiscordModule {
private Random _r;
public Searches() : base() {
internal class Searches : DiscordModule {
private readonly Random rng;
public Searches() {
commands.Add(new LoLCommands());
_r = new Random();
rng = new Random();
}
public override void Install(ModuleManager manager) {
var client = NadekoBot.Client;
manager.CreateCommands("", cgb => {
cgb.AddCheck(Classes.Permissions.PermissionChecker.Instance);
@ -34,14 +32,14 @@ namespace NadekoBot.Modules {
var str = await SearchHelper.ShortenUrl(await SearchHelper.FindYoutubeUrlByKeywords(e.GetArg("query")));
if (string.IsNullOrEmpty(str.Trim())) {
await e.Channel.SendMessage("Query failed");
await e.Channel.SendMessage("Query failed.");
return;
}
await e.Channel.SendMessage(str);
});
cgb.CreateCommand("~ani")
.Alias("~anime").Alias("~aq")
.Alias("~anime", "~aq")
.Parameter("query", ParameterType.Unparsed)
.Description("Queries anilist for an anime and shows the first result.")
.Do(async e => {
@ -75,13 +73,10 @@ namespace NadekoBot.Modules {
.Description("Shows a random cat image.")
.Do(async e => {
try {
await e.Channel.SendMessage(JObject.Parse(new StreamReader(
WebRequest.Create("http://www.random.cat/meow")
.GetResponse()
.GetResponseStream())
.ReadToEnd())["file"].ToString());
await e.Channel.SendMessage(JObject.Parse(
await SearchHelper.GetResponseAsync("http://www.random.cat/meow"))["file"].ToString());
}
catch { }
catch {}
});
cgb.CreateCommand("~i")
@ -91,11 +86,10 @@ namespace NadekoBot.Modules {
if (string.IsNullOrWhiteSpace(e.GetArg("query")))
return;
try {
var reqString = $"https://www.googleapis.com/customsearch/v1?q={Uri.EscapeDataString(e.GetArg("query"))}&cx=018084019232060951019%3Ahs5piey28-e&num=1&searchType=image&fields=items%2Flink&key={NadekoBot.creds.GoogleAPIKey}";
var reqString = $"https://www.googleapis.com/customsearch/v1?q={Uri.EscapeDataString(e.GetArg("query"))}&cx=018084019232060951019%3Ahs5piey28-e&num=1&searchType=image&fields=items%2Flink&key={NadekoBot.Creds.GoogleAPIKey}";
var obj = JObject.Parse(await SearchHelper.GetResponseAsync(reqString));
await e.Channel.SendMessage(obj["items"][0]["link"].ToString());
}
catch (Exception ex) {
} catch (Exception ex) {
await e.Channel.SendMessage($"💢 {ex.Message}");
}
});
@ -107,11 +101,10 @@ namespace NadekoBot.Modules {
if (string.IsNullOrWhiteSpace(e.GetArg("query")))
return;
try {
var reqString = $"https://www.googleapis.com/customsearch/v1?q={Uri.EscapeDataString(e.GetArg("query"))}&cx=018084019232060951019%3Ahs5piey28-e&num=1&searchType=image&start={ _r.Next(1, 150) }&fields=items%2Flink&key={NadekoBot.creds.GoogleAPIKey}";
var reqString = $"https://www.googleapis.com/customsearch/v1?q={Uri.EscapeDataString(e.GetArg("query"))}&cx=018084019232060951019%3Ahs5piey28-e&num=1&searchType=image&start={ rng.Next(1, 150) }&fields=items%2Flink&key={NadekoBot.Creds.GoogleAPIKey}";
var obj = JObject.Parse(await SearchHelper.GetResponseAsync(reqString));
await e.Channel.SendMessage(obj["items"][0]["link"].ToString());
}
catch (Exception ex) {
} catch (Exception ex) {
await e.Channel.SendMessage($"💢 {ex.Message}");
}
});
@ -134,8 +127,7 @@ namespace NadekoBot.Modules {
return;
}
await e.Channel.SendIsTyping();
var headers = new WebHeaderCollection();
headers.Add("X-Mashape-Key", NadekoBot.creds.MashapeKey);
var headers = new WebHeaderCollection {{"X-Mashape-Key", NadekoBot.Creds.MashapeKey}};
var res = await SearchHelper.GetResponseAsync($"https://omgvamp-hearthstone-v1.p.mashape.com/cards/search/{Uri.EscapeUriString(arg)}", headers);
try {
var items = JArray.Parse(res);
@ -155,11 +147,8 @@ namespace NadekoBot.Modules {
if (items.Count > 4) {
await e.Channel.SendMessage("⚠ Found over 4 images. Showing random 4.");
}
Console.WriteLine("Start");
await e.Channel.SendFile(arg + ".png", (await images.MergeAsync()).ToStream(System.Drawing.Imaging.ImageFormat.Png));
Console.WriteLine("Finish");
}
catch (Exception ex) {
} catch (Exception ex) {
await e.Channel.SendMessage($"💢 Error {ex.Message}");
}
});
@ -180,11 +169,9 @@ namespace NadekoBot.Modules {
try {
await e.Channel.SendFile($"{e.GetArg("usr")}.png", new MemoryStream(cle.Result));
await e.Channel.SendMessage($"`Profile Link:`https://osu.ppy.sh/u/{Uri.EscapeDataString(e.GetArg("usr"))}\n`Image provided by https://lemmmy.pw/osusig`");
}
catch { }
} catch { }
};
}
catch {
} catch {
await e.Channel.SendMessage("💢 Failed retrieving osu signature :\\");
}
}
@ -201,7 +188,7 @@ namespace NadekoBot.Modules {
}
await e.Channel.SendIsTyping();
var headers = new WebHeaderCollection();
headers.Add("X-Mashape-Key", NadekoBot.creds.MashapeKey);
headers.Add("X-Mashape-Key", NadekoBot.Creds.MashapeKey);
var res = await SearchHelper.GetResponseAsync($"https://mashape-community-urban-dictionary.p.mashape.com/define?term={Uri.EscapeUriString(arg)}", headers);
try {
var items = JObject.Parse(res);
@ -210,8 +197,7 @@ namespace NadekoBot.Modules {
sb.AppendLine($"`Definition:` {items["list"][0]["definition"].ToString()}");
sb.Append($"`Link:` <{await items["list"][0]["permalink"].ToString().ShortenUrl()}>");
await e.Channel.SendMessage(sb.ToString());
}
catch {
} catch {
await e.Channel.SendMessage("💢 Failed finding a definition for that term.");
}
});
@ -227,7 +213,7 @@ namespace NadekoBot.Modules {
}
await e.Channel.SendIsTyping();
var headers = new WebHeaderCollection();
headers.Add("X-Mashape-Key", NadekoBot.creds.MashapeKey);
headers.Add("X-Mashape-Key", NadekoBot.Creds.MashapeKey);
var res = await SearchHelper.GetResponseAsync($"https://tagdef.p.mashape.com/one.{Uri.EscapeUriString(arg)}.json", headers);
try {
var items = JObject.Parse(res);
@ -236,8 +222,7 @@ namespace NadekoBot.Modules {
sb.AppendLine($"`Definition:` {items["defs"]["def"]["text"].ToString()}");
sb.Append($"`Link:` <{await items["defs"]["def"]["uri"].ToString().ShortenUrl()}>");
await e.Channel.SendMessage(sb.ToString());
}
catch {
} catch {
await e.Channel.SendMessage("💢 Failed finidng a definition for that tag.");
}
});

@ -8,7 +8,7 @@ using System.Timers;
using NadekoBot.Extensions;
namespace NadekoBot.Modules {
class Trello : DiscordModule {
internal class Trello : DiscordModule {
public override void Install(ModuleManager manager) {
var client = manager.Client;