29 lines
685 B
C++
29 lines
685 B
C++
#pragma once
|
|
#include <Command/Interface.hpp>
|
|
#include <charconv>
|
|
#include <format>
|
|
#include <ts6bot/MusicManager.hpp>
|
|
|
|
class Stop : public Command
|
|
{
|
|
public:
|
|
|
|
void execute(const CommandContext& ctx) override
|
|
{
|
|
if (!ctx.musicManager.expired()) {
|
|
ctx.musicManager.lock()->stop();
|
|
ctx.reply("Playback stopped and queue cleared.");
|
|
}
|
|
}
|
|
std::string_view getDescription() const override
|
|
{
|
|
return "Stops playback and clears queue.";
|
|
}
|
|
CommandCategory getCategory() const override
|
|
{
|
|
return CommandCategory::Music;
|
|
}
|
|
std::vector<std::string_view> getAliases() const override { return {}; }
|
|
std::string_view getUsage() const override { return ""; }
|
|
};
|