More fixes to the new config. Module loader reworked

This commit is contained in:
2024-08-06 22:47:59 +03:00
parent 27e25a9166
commit 18a059af0e
51 changed files with 390 additions and 301 deletions

View File

@@ -4,12 +4,12 @@ using DiscordBotCore.Interfaces;
namespace MusicPlayer.SlashCommands;
public class Loop: DBSlashCommand
public class Loop: IDbSlashCommand
{
public string Name => "loop";
public string Description => "Loop the current song for a certain amount of times. If no times are specified, it will loop once";
public bool canUseDM => false;
public bool CanUseDm => false;
public bool HasInteraction => false;
public List<SlashCommandOptionBuilder> Options => new()

View File

@@ -7,11 +7,11 @@ using DiscordBotCore.Others;
namespace MusicPlayer.SlashCommands;
public class Play: DBSlashCommand
public class Play: IDbSlashCommand
{
public string Name => "play";
public string Description => "Play music command";
public bool canUseDM => false;
public bool CanUseDm => false;
public bool HasInteraction => false;
public List<SlashCommandOptionBuilder> Options => new()
@@ -55,7 +55,7 @@ public class Play: DBSlashCommand
if (user is null)
{
await context.RespondAsync("Failed to get user data from channel ! Check error log at " + DateTime.Now.ToLongTimeString());
Application.CurrentApplication.Logger.Log("User is null while trying to convert from context.User to IGuildUser.", typeof(Play), LogType.Error);
Application.Logger.Log("User is null while trying to convert from context.User to IGuildUser.", typeof(Play), LogType.Error);
return;
}

View File

@@ -4,11 +4,11 @@ using DiscordBotCore.Interfaces;
namespace MusicPlayer.SlashCommands;
public class Queue: DBSlashCommand
public class Queue: IDbSlashCommand
{
public string Name => "queue";
public string Description => "Queue a melody to play";
public bool canUseDM => false;
public bool CanUseDm => false;
public bool HasInteraction => false;
public List<SlashCommandOptionBuilder> Options => null;

View File

@@ -4,11 +4,11 @@ using DiscordBotCore.Interfaces;
namespace MusicPlayer.SlashCommands;
public class Skip: DBSlashCommand
public class Skip: IDbSlashCommand
{
public string Name => "skip";
public string Description => "Skip the current melody";
public bool canUseDM => false;
public bool CanUseDm => false;
public bool HasInteraction => false;
public List<SlashCommandOptionBuilder> Options => null;