adding flags

This commit is contained in:
2023-07-30 23:37:37 -03:00
parent 59aa6a13a3
commit 9df9090812
7 changed files with 73 additions and 24 deletions

14
Models/Connection.cs Normal file
View File

@@ -0,0 +1,14 @@
using Discord;
using Discord.Audio;
using Kasbot.Services;
namespace Kasbot.Models
{
public class Connection
{
public IAudioClient AudioClient { get; set; }
public IVoiceChannel AudioChannel { get; set; }
public Stream? CurrentAudioStream { get; set; }
public Queue<Media> Queue { get; set; } = new Queue<Media>();
}
}

30
Models/Flags.cs Normal file
View File

@@ -0,0 +1,30 @@
namespace Kasbot.Models
{
public class Flags
{
public bool Silent { get; set; }
public bool Repeat { get; set; }
public Flags() { }
public Flags(string command)
{
this.Parse(command);
}
public void Parse(string command)
{
if (command.Contains("-s") ||
command.Contains("-silent"))
{
Silent = true;
}
if (command.Contains("-r") ||
command.Contains("-repeat"))
{
Repeat = true;
}
}
}
}