Decently sized C#6 refactor

Also removed unused using statements
This commit is contained in:
Kwoth
2015-12-12 23:39:58 +01:00
parent 1847ddbbe2
commit d9657436a4
10 changed files with 161 additions and 221 deletions

View File

@ -8,7 +8,6 @@ using System.Timers;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Drawing;
using Newtonsoft.Json.Linq;
using System.IO;
using System.Text;
using System.Drawing.Imaging;
@ -29,10 +28,7 @@ namespace NadekoBot.Modules
return cb;
}
private CommandBuilder AliasCommand(CommandBuilder cb, string txt)
{
return cb.Alias(new string[] { "," + txt, "-" + txt });
}
private CommandBuilder AliasCommand(CommandBuilder cb, string txt) => cb.Alias(new string[] { "," + txt, "-" + txt });
public override void Install(ModuleManager manager)
{
@ -546,7 +542,7 @@ namespace NadekoBot.Modules
invites+=invite.Url+"\n";
i++;
}
catch (Exception ex) {
catch (Exception) {
j++;
continue;
}
@ -640,12 +636,7 @@ namespace NadekoBot.Modules
return ImageHandler.ImageToStream(bm,ImageFormat.Png);
}
private Func<CommandEventArgs, Task> SayYes()
{
return async e =>
{
await NadekoBot.client.SendMessage(e.Channel, "Yes. :)");
};
}
private Func<CommandEventArgs, Task> SayYes()
=> async e => await NadekoBot.client.SendMessage(e.Channel, "Yes. :)");
}
}