now even runs
This commit is contained in:
parent
e54ceba0ab
commit
e8e6854959
@ -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;
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user