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

+24 -17
View File
@@ -17,14 +17,15 @@ 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;
}
if (ctx.args.empty()) {
ctx.reply("Usage: select <number>\nSelect a track from "
"your last search results.");
ctx.reply(ctx.tr(
"Usage: select <number>\nSelect a track from "
"your last search results."));
return;
}
@@ -35,8 +36,8 @@ namespace Echoion::Core
ctx.args.data() + ctx.args.size(),
index);
if (result.ec != std::errc() || index == 0) {
ctx.reply(
"Please provide a valid number (1, 2, 3, etc.).");
ctx.reply(ctx.tr(
"Please provide a valid number (1, 2, 3, etc.)."));
return;
}
@@ -45,19 +46,23 @@ namespace Echoion::Core
ctx.clientId, index, invokerName);
if (!selectResult) {
Void::Log::error("SelectCommand", "{}", std::format(
"Select failed for client {} index {}: {}",
ctx.clientId, index, selectResult.error().message));
Void::Log::error(
"SelectCommand", "{}",
std::format(
"Select failed for client {} index {}: {}",
ctx.clientId, index,
selectResult.error().message));
if (selectResult.error().code ==
Api::ErrorCode::NotFound) {
ctx.reply(std::format(
"No search results found. Use {}play "
"<query> to search first.",
ctx.prefix));
ctx.reply(
ctx.trf("No search results found. Use {}play "
"<query> to search first.",
ctx.prefix));
} else {
ctx.reply("Couldn't select that track. Please try "
"again.");
ctx.reply(
ctx.tr("Couldn't select that track. Please try "
"again."));
}
return;
}
@@ -65,9 +70,11 @@ namespace Echoion::Core
ctx.reply(*selectResult);
} catch (const std::exception& e) {
Void::Log::error("SelectCommand", "{}",
Void::Log::error(
"SelectCommand", "{}",
std::format("Select command exception: {}", e.what()));
ctx.reply("Something went wrong. Please try again.");
ctx.reply(
ctx.tr("Something went wrong. Please try again."));
}
}