Fixed PluginLoading to use the context instead of appDomain

This commit is contained in:
2025-05-22 18:07:25 +03:00
parent e57e941c94
commit a0177ce145
3 changed files with 70 additions and 73 deletions

View File

@@ -1,6 +1,4 @@
using Discord;
using DiscordBotCore.Logging;
using DiscordBotCore.PluginCore.Helpers;
using DiscordBotCore.PluginCore.Helpers.Execution.DbCommand;
using DiscordBotCore.PluginCore.Interfaces;
@@ -12,7 +10,7 @@ internal class LevelCommand: IDbCommand
public List<string> Aliases => ["lvl", "rank"];
public string Description => "Display tour current level";
public string Description => "Display your current level";
public string Usage => "level";
@@ -25,8 +23,7 @@ internal class LevelCommand: IDbCommand
args.Logger.Log("Database is not initialized", this);
return;
}
object[]? user = await Variables.Database.ReadDataArrayAsync($"SELECT * FROM Levels WHERE UserID=@userId",
new KeyValuePair<string, object>("userId", args.Context.Message.Author.Id));