now even runs

This commit is contained in:
Master Kwoth 2017-10-18 04:32:05 +02:00
parent e54ceba0ab
commit e8e6854959
2 changed files with 28 additions and 29 deletions

View File

@ -1,31 +1,31 @@
using NadekoBot.Core.Services;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
//using NadekoBot.Core.Services;
//using System;
//using System.Collections.Generic;
//using System.IO;
//using System.Linq;
//using System.Text.RegularExpressions;
namespace NadekoBot.Modules.Administration.Services
{
public class PackagesService : INService
{
public IEnumerable<string> Packages { get; private set; }
//namespace NadekoBot.Modules.Administration.Services
//{
// public class PackagesService : INService
// {
// public IEnumerable<string> Packages { get; private set; }
public PackagesService()
{
ReloadAvailablePackages();
}
// public PackagesService()
// {
// ReloadAvailablePackages();
// }
public void ReloadAvailablePackages()
{
Packages = Directory.GetDirectories(Path.Combine(AppContext.BaseDirectory, "modules\\"), "NadekoBot.Modules.*", SearchOption.AllDirectories)
.SelectMany(x => Directory.GetFiles(x, "NadekoBot.Modules.*.dll"))
.Select(x => Path.GetFileNameWithoutExtension(x))
.Select(x =>
{
var m = Regex.Match(x, @"NadekoBot\.Modules\.(?<name>.*)");
return m.Groups["name"].Value;
});
}
}
}
// public void ReloadAvailablePackages()
// {
// Packages = Directory.GetDirectories(Path.Combine(AppContext.BaseDirectory, "modules\\"), "NadekoBot.Modules.*", SearchOption.AllDirectories)
// .SelectMany(x => Directory.GetFiles(x, "NadekoBot.Modules.*.dll"))
// .Select(x => Path.GetFileNameWithoutExtension(x))
// .Select(x =>
// {
// var m = Regex.Match(x, @"NadekoBot\.Modules\.(?<name>.*)");
// return m.Groups["name"].Value;
// });
// }
// }
//}

View File

@ -74,7 +74,6 @@ namespace NadekoBot.Extensions
if (lastPage == 0)
return;
await msg.AddReactionAsync(arrow_left).ConfigureAwait(false);
await msg.AddReactionAsync(arrow_right).ConfigureAwait(false);