making WEB

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-11 00:45:17 +03:00
1 parent d146f11f02
commit 5c036d91fb
72 files changed
+5875 -1243

No files matched your search

+17 -13
View File
@@ -17,8 +17,8 @@ namespace Echoion::Core
try {
auto manager = ctx.musicManager.lock();
if (!manager) {
ctx.reply(
"The music service is currently unavailable.");
ctx.reply(ctx.tr(
"The music service is currently unavailable."));
return;
}
@@ -29,35 +29,39 @@ namespace Echoion::Core
ctx.args.data() + ctx.args.size(),
count);
if (result.ec != std::errc() || count == 0) {
ctx.reply(
"Please provide a valid number (1 or more).");
ctx.reply(ctx.tr(
"Please provide a valid number (1 or more)."));
return;
}
}
auto result = manager->skip(count);
if (!result) {
Void::Log::error("SkipCommand", "{}", std::format("Skip command failed: {}",
result.error().message));
Void::Log::error("SkipCommand", "{}",
std::format("Skip command failed: {}",
result.error().message));
if (result.error().code == Api::ErrorCode::NotFound) {
ctx.reply(
"No more tracks in the queue to skip to.");
ctx.reply(ctx.tr(
"No more tracks in the queue to skip to."));
} else {
ctx.reply("Couldn't skip. Please try again.");
ctx.reply(
ctx.tr("Couldn't skip. Please try again."));
}
return;
}
if (count == 1) {
ctx.reply("Skipped to next track.");
ctx.reply(ctx.tr("Skipped to next track."));
} else {
ctx.reply(std::format("Skipped {} tracks.", count));
ctx.reply(ctx.trf("Skipped {} tracks.", count));
}
} catch (const std::exception& e) {
Void::Log::error("SkipCommand", "{}",
Void::Log::error(
"SkipCommand", "{}",
std::format("Skip command exception: {}", e.what()));
ctx.reply("Something went wrong. Please try again.");
ctx.reply(
ctx.tr("Something went wrong. Please try again."));
}
}