adding flags
This commit is contained in:
14
Models/Connection.cs
Normal file
14
Models/Connection.cs
Normal 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
30
Models/Flags.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user