First steps to Web UI
This commit is contained in:
@@ -40,12 +40,10 @@ namespace DiscordBot.Bot.Actions
|
||||
|
||||
private void ListLoadedModules()
|
||||
{
|
||||
|
||||
var modules = Application.CurrentApplication.GetLoadedCoreModules();
|
||||
var modules = Application.CurrentApplication.ModuleManager.GetLocalModules();
|
||||
foreach (var module in modules)
|
||||
{
|
||||
Application.Logger.Log("Module: " + module.Key.ModuleName, this, LogType.Info);
|
||||
|
||||
Application.Logger.Log("Module: " + module.ModuleName, this, LogType.Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using DiscordBot.Utilities;
|
||||
using DiscordBotCore;
|
||||
using DiscordBotCore.Bot;
|
||||
using DiscordBotCore.Others;
|
||||
using DiscordBotCore.Others.Exceptions;
|
||||
using DiscordBotCore.Updater.Application;
|
||||
|
||||
using Spectre.Console;
|
||||
@@ -21,7 +22,6 @@ public class Program
|
||||
/// </summary>
|
||||
public static async Task Startup(string[] args)
|
||||
{
|
||||
|
||||
await LoadComponents(args);
|
||||
await PrepareConsole();
|
||||
await PluginMethods.RefreshPlugins(false);
|
||||
@@ -64,10 +64,11 @@ public class Program
|
||||
|
||||
try
|
||||
{
|
||||
var token = Application.CurrentApplication.ApplicationEnvironmentVariables.Get<string>("token");
|
||||
var prefix = Application.CurrentApplication.ApplicationEnvironmentVariables.Get<string>("prefix");
|
||||
var discordbooter = new DiscordBotApplication(token, prefix);
|
||||
await discordbooter.StartAsync();
|
||||
var token = Application.CurrentApplication.ApplicationEnvironmentVariables.Get<string>("token");
|
||||
var prefix = Application.CurrentApplication.ApplicationEnvironmentVariables.Get<string>("prefix");
|
||||
|
||||
DiscordBotApplication discordApp = new (token, prefix);
|
||||
await discordApp.StartAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -80,8 +81,8 @@ public class Program
|
||||
/// </summary>
|
||||
/// <param name="args">The startup arguments</param>
|
||||
private static async Task LoadComponents(string[] args)
|
||||
{
|
||||
await Application.CreateApplication();
|
||||
{
|
||||
await Application.CreateApplication(default);
|
||||
|
||||
AppUpdater updater = new AppUpdater();
|
||||
Update? update = await updater.PrepareUpdate();
|
||||
|
||||
Reference in New Issue
Block a user