moved extensions to a separate module, added lmgtfy
This commit is contained in:
@ -6,6 +6,7 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Timers;
|
||||
using Discord.Commands.Permissions.Visibility;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot.Modules
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Drawing.Imaging;
|
||||
using Discord.Legacy;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot.Modules
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Modules;
|
||||
using Discord.Legacy;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot.Modules
|
||||
{
|
||||
|
@ -3,18 +3,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Modules;
|
||||
using Discord.Commands;
|
||||
using System.IO;
|
||||
using Discord;
|
||||
using Discord.Audio;
|
||||
using System.Collections.Concurrent;
|
||||
using YoutubeExtractor;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
using Discord.Legacy;
|
||||
using NadekoBot.Extensions;
|
||||
using System.Net;
|
||||
using System.Globalization;
|
||||
|
||||
@ -196,7 +194,7 @@ namespace NadekoBot.Modules {
|
||||
.OrderByDescending(v => v.AudioBitrate).FirstOrDefault();
|
||||
|
||||
if (video == null)
|
||||
throw new Exception("Could not load any video elements"); // First one
|
||||
throw new Exception("Could not load any video elements");
|
||||
|
||||
StreamUrl = video.DownloadUrl;
|
||||
Title = video.Title;
|
||||
|
@ -1,19 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Modules;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net.Http;
|
||||
using Discord.Legacy;
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot.Modules
|
||||
{
|
||||
@ -109,6 +103,13 @@ namespace NadekoBot.Modules
|
||||
await e.Send("This feature is being reconstructed.");
|
||||
|
||||
});
|
||||
cgb.CreateCommand("lmgtfy")
|
||||
.Description("Google something for an idiot.")
|
||||
.Parameter("ffs", ParameterType.Unparsed)
|
||||
.Do(async e => {
|
||||
if (e.GetArg("ffs") == null || e.GetArg("ffs").Length < 1) return;
|
||||
await e.Send($"http://lmgtfy.com/?q={ Uri.EscapeUriString(e.GetArg("ffs").ToString()) }".ShortenUrl());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Modules;
|
||||
using Manatee.Trello.ManateeJson;
|
||||
using Manatee.Trello;
|
||||
using System.Timers;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot.Modules {
|
||||
class Trello : DiscordModule {
|
||||
|
Reference in New Issue
Block a user