diff --git a/commands/login.mjs b/commands/login.mjs deleted file mode 100644 index add6c15..0000000 --- a/commands/login.mjs +++ /dev/null @@ -1,29 +0,0 @@ -import { CommandBuilder } from "../src/CommandHandler.mjs"; -import { EmbedBuilder } from "@fluxerjs/core"; -import { getGlobalColor } from "../src/MessageHandler.mjs"; - -export const command = new CommandBuilder() - .setName("login") - .setDescription("Confirm a login of your account on the website", "commands.login") - .setCategory("util") - .addStringOption(o => - o.setName("id") - .setDescription("The id you got from logging in at the dashboard.", "options.login.id") - .setRequired(true)); - -export async function run(msg, data) { - const code = data.get("id").value; - - if (!this.dashboard?.enabled) { - const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.login.dashboardDisabled")); - return msg.reply({ embeds: [embed] }); - } - - const error = await this.dashboard.confirmLogin(msg.author.id, code); - const desc = (error === null) - ? this.t(msg, "responses.login.success") - : this.t(msg, "responses.login.failed", { error }); - - const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc); - msg.reply({ embeds: [embed] }); -} diff --git a/config_example.json b/config_example.json index e0a9b10..8d53b90 100644 --- a/config_example.json +++ b/config_example.json @@ -65,6 +65,12 @@ "enabled": false, "redis": { "url": "redis://localhost:6379" + }, + "Comment": "Fluxer OAuth2 credentials for dashboard login. Create an OAuth2 app at https://fluxer.app/developers/applications", + "fluxer": { + "id": "your fluxer oauth2 application id", + "secret": "your fluxer oauth2 client secret", + "redirectUri": "https://your-backend.com/auth/fluxer" } }, "dashboardUrl": "The url the dashboard is accessible with.", diff --git a/index.mjs b/index.mjs index 31cba76..9897b42 100644 --- a/index.mjs +++ b/index.mjs @@ -44,8 +44,8 @@ export class Remix { this.locale.load(); this.dashboard = new Dashboard(this, { - mysql: config.mysql, ...config.dashboard, + fluxer: config.dashboard?.fluxer, }); const presenceContents = config.presenceContents ?? []; diff --git a/src/PlayerManager.mjs b/src/PlayerManager.mjs index 3cacd28..2d580c1 100644 --- a/src/PlayerManager.mjs +++ b/src/PlayerManager.mjs @@ -516,22 +516,25 @@ export class PlayerManager { */ async leave(msg, cid) { if (!cid) { - const serverId = msg.channel?.server_id ?? msg.channel?.serverId ?? - msg.message?.server_id ?? msg.message?.serverId; - if (serverId) { + const guildId = getMessageGuildId(msg); + if (guildId) { const matchedEntry = [...this.playerMap.entries()].find(([, player]) => - String(player?._guildId ?? "").replace(/\D/g, "") === String(serverId).replace(/\D/g, "") + getPlayerGuildId(player) === cleanId(guildId) ); - cid = matchedEntry?.[0] ?? null; + cid = getPlayerChannelId(matchedEntry?.[1], matchedEntry?.[0]) || matchedEntry?.[0] || null; } } - const player = cid ? this.playerMap.get(cid) : null; + const cleanChannelId = cleanId(cid); + const player = cleanChannelId + ? this.playerMap.get(cleanChannelId) ?? + [...this.playerMap.values()].find((entry) => getPlayerChannelId(entry) === cleanChannelId) + : null; if (!player) return msg.reply(mkEmbed(this._t(msg, "responses._common.notInVoice"))); - const activeChannelId = String(player._channelId ?? cid).replace(/\D/g, "") || cid; + const activeChannelId = getPlayerChannelId(player, cleanChannelId) || cleanChannelId; this.playerMap.delete(activeChannelId); - if (activeChannelId !== cid) this.playerMap.delete(cid); + if (activeChannelId !== cleanChannelId) this.playerMap.delete(cleanChannelId); await msg.reply(mkEmbed(this._t(msg, "responses._common.successfullyLeft"))); await player.leave(); player.destroy(); @@ -652,29 +655,4 @@ export class PlayerManager { })(); } - async leave(msg, cid) { - if (!cid) { - const guildId = getMessageGuildId(msg); - if (guildId) { - const matchedEntry = [...this.playerMap.entries()].find(([, player]) => - getPlayerGuildId(player) === cleanId(guildId) - ); - cid = getPlayerChannelId(matchedEntry?.[1], matchedEntry?.[0]) || matchedEntry?.[0] || null; - } - } - - const cleanChannelId = cleanId(cid); - const player = cleanChannelId - ? this.playerMap.get(cleanChannelId) ?? - [...this.playerMap.values()].find((entry) => getPlayerChannelId(entry) === cleanChannelId) - : null; - if (!player) return msg.reply(mkEmbed(this._t(msg, "responses._common.notInVoice"))); - - const activeChannelId = getPlayerChannelId(player, cleanChannelId) || cleanChannelId; - this.playerMap.delete(activeChannelId); - if (activeChannelId !== cleanChannelId) this.playerMap.delete(cleanChannelId); - await msg.reply(mkEmbed(this._t(msg, "responses._common.successfullyLeft"))); - await player.leave(); - player.destroy(); - } } diff --git a/src/dashboard/Dashboard.mjs b/src/dashboard/Dashboard.mjs index 9b5b73a..6cd7cbb 100644 --- a/src/dashboard/Dashboard.mjs +++ b/src/dashboard/Dashboard.mjs @@ -2,30 +2,58 @@ import { Remix } from "../../index.mjs"; import { CommandBuilder, CommandHandler, Option } from "../CommandHandler.mjs"; import Player from "../Player.mjs"; import { Utils } from "../Utils.mjs"; -import { DatabaseManager } from "./DatabaseManager.mjs"; import { RedisHandler } from "./RedisHandler.mjs"; +/** + * Fluxer OAuth2 configuration (standard OAuth2 authorization code flow). + * @typedef {Object} FluxerOAuth2Config + * @property {string} id OAuth2 client ID + * @property {string} secret OAuth2 client secret + * @property {string} redirectUri Redirect URI registered on the Fluxer app + * @property {string} [apiBase] Fluxer API base URL (default: https://api.fluxer.app) + */ + +/** Default Fluxer API endpoints derived from the Fluxer platform docs */ +const FLUXER_API_DEFAULTS = { + apiBase: "https://api.fluxer.app/v1", + tokenEndpoint: "https://api.fluxer.app/v1/oauth2/token", + authorizeEndpoint: "https://fluxer.app/oauth2/authorize", + userinfoEndpoint: "https://api.fluxer.app/v1/users/@me", +}; + export class Dashboard { enabled = false; - expiryTime = 1000 * 60 * 60 * 6; + /** * @param {Remix} remix * @param {Object} opts * @param {boolean} opts.enabled Whether the Dashboard is enabled and connections should be attempted * @param {Object} opts.redis Connection options passed directly to redis createClient - * @param {Object} opts.mysql mysql2 pool options + * @param {FluxerOAuth2Config} [opts.fluxer] Fluxer OAuth2 credentials */ constructor(remix, opts) { this.enabled = opts?.enabled; this.remix = remix; - if (!this.enabled) return this; + // Fluxer OAuth2 config + const fluxer = opts?.fluxer ?? {}; + this.fluxer = { + clientId: fluxer.id, + clientSecret: fluxer.secret, + redirectUri: fluxer.redirectUri, + apiBase: fluxer.apiBase ?? FLUXER_API_DEFAULTS.apiBase, + tokenEndpoint: fluxer.tokenEndpoint ?? FLUXER_API_DEFAULTS.tokenEndpoint, + authorizeEndpoint: fluxer.authorizeEndpoint ?? FLUXER_API_DEFAULTS.authorizeEndpoint, + userinfoEndpoint: fluxer.userinfoEndpoint ?? FLUXER_API_DEFAULTS.userinfoEndpoint, + }; - this.db = new DatabaseManager(opts.mysql); + if (!this.enabled) return this; this.redis = new RedisHandler(opts.redis); this.redis.setRequestHandler(async (data) => { switch (data.type) { + // ── Existing request types ───────────────────────────────────────────── + case "fetchPlayers": return [...this.remix.players.playerMap.values()].map(p => Dashboard.convertPlayer(p)); @@ -36,7 +64,9 @@ export class Dashboard { } case "sharedServers": - return await this.remix.getSharedServers(await this.remix.client.users.fetch(data.key).catch(() => null)); + return await this.remix.getSharedServers( + await this.remix.client.users.fetch(data.key).catch(() => null) + ); case "server": { try { @@ -53,20 +83,161 @@ export class Dashboard { return server; } catch (e) { const id = Utils.uid(); - console.log(e, id); + console.log("[Dashboard] Server error:", id, e); return { error: "An error occurred. Id: " + id }; } } case "commands": - return this.remix.handler.commands.map(c => Dashboard.convertCommand(c, this.remix.handler)); + return this.remix.handler.commands.map(c => + Dashboard.convertCommand(c, this.remix.handler) + ); case "function": return await this.runFunction(data.params); + + // ── Fluxer OAuth2 request types ───────────────────────────────────────── + + case "fluxerAuthorizeUrl": { + // Returns the full OAuth2 authorize URL for the dashboard frontend to redirect to + const scopes = (data.scopes ?? ["identify"]).join(" "); + const state = data.state ?? Utils.uid(); + const url = new URL(this.fluxer.authorizeEndpoint); + url.searchParams.set("client_id", this.fluxer.clientId); + url.searchParams.set("redirect_uri", this.fluxer.redirectUri); + url.searchParams.set("response_type", "code"); + url.searchParams.set("scope", scopes); + url.searchParams.set("state", state); + return { url: url.toString(), state }; + } + + case "fluxerVerify": { + // Backend sends a Fluxer access token — bot verifies it and returns user info. + // The bot calls the Fluxer API's /users/@me with the access token to + // confirm the user's identity, then cross-references with the bot's + // internal user cache to confirm the user is known. + const accessToken = data.accessToken; + if (!accessToken) return { error: "Missing access token" }; + return await this.verifyFluxerToken(accessToken); + } + + case "fluxerToken": { + // Backend sends an authorization code — bot exchanges it for tokens. + // This is useful if the bot wants to perform the code→token exchange + // itself rather than relying on the backend to do it. + const code = data.code; + if (!code) return { error: "Missing authorization code" }; + return await this.exchangeFluxerCode(code); + } } }); } + // ═══════════════════════════════════════════════════════════════════════════ + // Fluxer OAuth2 Methods + // ═══════════════════════════════════════════════════════════════════════════ + + /** + * Verify a Fluxer OAuth2 access token by calling the Fluxer /users/@me endpoint. + * Returns the user object from the Fluxer API, plus a `knownToBot` flag + * indicating whether this user is cached in the bot's client. + * + * @param {string} accessToken + * @returns {Promise} User data or error + */ + async verifyFluxerToken(accessToken) { + try { + const res = await fetch(this.fluxer.userinfoEndpoint, { + headers: { Authorization: `Bearer ${accessToken}` }, + }); + + if (!res.ok) { + const body = await res.text().catch(() => ""); + console.log("[Dashboard] Fluxer token verification failed:", res.status, body); + return { error: "Invalid or expired access token", status: res.status }; + } + + const fluxerUser = await res.json(); + if (!fluxerUser?.id) { + return { error: "Fluxer API returned no user ID" }; + } + + // Cross-reference with the bot's cached users to check if this user + // shares any servers with the bot (i.e. is a potential dashboard user). + let botUser = null; + try { + botUser = await this.remix.client.users.fetch(fluxerUser.id).catch(() => null); + } catch (_) {} + + return { + id: fluxerUser.id, + username: fluxerUser.username, + displayName: fluxerUser.displayName ?? fluxerUser.globalName ?? fluxerUser.username, + avatar: { + url: fluxerUser.avatar + ? `https://cdn.fluxer.app/avatars/${fluxerUser.id}/${fluxerUser.avatar}.webp` + : null, + }, + knownToBot: !!botUser, + botUser: botUser ? Dashboard.convertUser(botUser) : null, + }; + } catch (e) { + console.log("[Dashboard] Fluxer verify error:", e.message); + return { error: "Failed to verify with Fluxer API: " + e.message }; + } + } + + /** + * Exchange an OAuth2 authorization code for access/refresh tokens. + * This calls the Fluxer token endpoint directly. + * + * @param {string} code Authorization code from the OAuth2 redirect + * @returns {Promise} Token data or error + */ + async exchangeFluxerCode(code) { + try { + const body = new URLSearchParams({ + grant_type: "authorization_code", + code, + redirect_uri: this.fluxer.redirectUri, + client_id: this.fluxer.clientId, + client_secret: this.fluxer.clientSecret, + }); + + const res = await fetch(this.fluxer.tokenEndpoint, { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body, + }); + + if (!res.ok) { + const errorBody = await res.text().catch(() => ""); + console.log("[Dashboard] Fluxer token exchange failed:", res.status, errorBody); + return { error: "Token exchange failed", status: res.status }; + } + + const tokens = await res.json(); + if (!tokens.access_token) { + return { error: "No access_token in response" }; + } + + return { + accessToken: tokens.access_token, + tokenType: tokens.token_type ?? "Bearer", + expiresIn: tokens.expires_in ?? null, + refreshToken: tokens.refresh_token ?? null, + scope: tokens.scope ?? null, + }; + } catch (e) { + console.log("[Dashboard] Fluxer token exchange error:", e.message); + return { error: "Failed to exchange code: " + e.message }; + } + } + + // ═══════════════════════════════════════════════════════════════════════════ + // Dashboard Function Dispatch + // ═══════════════════════════════════════════════════════════════════════════ + /** * @param {Object} params * @param {string} params.func @@ -74,7 +245,7 @@ export class Dashboard { * @returns {Promise} */ async runFunction(params) { - var user; + let user; if (!!params.data.user) { try { user = await this.remix.client.users.fetch(params.data.user); @@ -85,7 +256,7 @@ export class Dashboard { } switch (params.func) { case "join": { - var voiceChannel, textChannel; + let voiceChannel, textChannel; try { voiceChannel = await this.remix.client.channels.fetch(params.data.channel); textChannel = await this.remix.client.channels.fetch(params.data.text); @@ -101,39 +272,39 @@ export class Dashboard { } case "pausePlayback": { - var player = this._getPlayerById(params.data.player); + let player = this._getPlayerById(params.data.player); if (!player) return { error: "Player not found" }; - var msg = player.pause() || "Paused successfully"; + let msg = player.pause() || "Paused successfully"; return { message: msg }; } case "resumePlayback": { - var player = this._getPlayerById(params.data.player); + let player = this._getPlayerById(params.data.player); if (!player) return { error: "Player not found" }; - var msg = player.resume() || "Resumed successfully"; + let msg = player.resume() || "Resumed successfully"; return { message: msg }; } case "skip": { - var player = this._getPlayerById(params.data.player); + let player = this._getPlayerById(params.data.player); if (!player) return { error: "Player not found" }; - var msg = player.skip() || "Skipped song"; + let msg = player.skip() || "Skipped song"; return { message: msg }; } case "volume": { - var player = this._getPlayerById(params.data.player); + let player = this._getPlayerById(params.data.player); if (!player) return { error: "Player not found" }; - var msg = player.setVolume(params.data.volume); + let msg = player.setVolume(params.data.volume); return { message: msg }; } case "addToQueue": { - var player = this._getPlayerById(params.data.player); + let player = this._getPlayerById(params.data.player); if (!player) return { error: "Player not found" }; if (!user) return { error: "Invalid user" }; - var type = params.data.type; - var query = params.data.query; + const type = params.data.type; + const query = params.data.query; if (type === "radio") { const radio = this.remix.config.radio.find(e => e.name === query); if (!radio) return { error: "Invalid radio station" }; @@ -157,7 +328,9 @@ export class Dashboard { */ _getPlayerById(id) { return this.remix.players.playerMap.get(id) - ?? [...this.remix.players.playerMap.values()].find(p => p._channelId === id || p._guildId === id) + ?? [...this.remix.players.playerMap.values()].find( + p => p._channelId === id || p._guildId === id + ) ?? null; } @@ -181,7 +354,7 @@ export class Dashboard { username: user.username, displayName: user.displayName ?? user.globalName ?? user.username, avatar: { - url: user.displayAvatarURL() ?? user.defaultAvatarURL + url: user.displayAvatarURL() ?? user.defaultAvatarURL, }, }; } @@ -204,9 +377,9 @@ export class Dashboard { description: vid.description, artist: { name: vid.author?.name ?? vid.artist, - url: vid.author?.url + url: vid.author?.url, }, - thumbnail: vid.thumbnail + thumbnail: vid.thumbnail, }; } @@ -242,7 +415,7 @@ export class Dashboard { isVoice, voiceParticipants, mature: channel.nsfw ?? false, - serverId: channel.guildId + serverId: channel.guildId, }; } @@ -283,7 +456,7 @@ export class Dashboard { volume: (player.preferredVolume ?? 1) * 100, queue: { current: Dashboard.convertVideo(player.queue.current), - data: (player.queue.data ?? []).map(v => Dashboard.convertVideo(v)) + data: (player.queue.data ?? []).map(v => Dashboard.convertVideo(v)), }, users: (() => { if (!channel) return []; @@ -319,7 +492,7 @@ export class Dashboard { required: opt.required, uid: opt.uid, defaultValue: opt.defaultValue, - dynamicDefaultPresent: !!opt.dynamicDefault + dynamicDefaultPresent: !!opt.dynamicDefault, }; } @@ -337,7 +510,7 @@ export class Dashboard { category: com.category, examples: com.examples, usage: commands.helpHandler?.commandUsage?.(com, { - message: { guildId: null } + message: { guildId: null }, }) ?? null, options: com.options.map(o => Dashboard.convertOption(o)), }; @@ -355,7 +528,7 @@ export class Dashboard { const serialised = Dashboard.convertPlayer(player); this.redis.send(this.redis.platform + ":players", JSON.stringify({ ...details, - player: serialised + player: serialised, })); } @@ -380,7 +553,7 @@ export class Dashboard { const channel = this.redis.platform + ":users"; this.redis.send(channel, JSON.stringify({ ...details, - user: Dashboard.convertUser(user) + user: Dashboard.convertUser(user), })); } @@ -389,31 +562,4 @@ export class Dashboard { const channel = this.redis.platform + ":user_" + user.id; this.redis.send(channel, JSON.stringify(details)); } - - /** - * Verify a dashboard login code for a user - * @param {string} user User ID - * @param {string} code Plaintext code to check - * @returns {Promise} null on success, error string on failure - */ - async confirmLogin(user, code) { - if (!this.enabled) return "Dashboard not enabled."; - var res; - try { - res = await this.db.execute("SELECT * FROM login_codes WHERE user=?", [user]); - } catch (e) { - const id = Utils.uid(); - console.log("[Dashboard] MySQL error, id: ", id, e); - return "An error occurred, please contact an administrator. Error id: `" + id + "`"; - } - if (res.length === 0) return "If this is a valid code, it was not created for your account."; - for (let i = 0; i < res.length; i++) { - if ((await this.db.compareHash(code, res[i].token))) { - if (Date.now() - this.expiryTime > (new Date(res[i].createdAt)).getTime()) return "Login token expired"; - await this.db.execute("UPDATE login_codes SET verified=true WHERE id=?", [res[i].id]); - return null; - } - } - return "Invalid code."; - } } diff --git a/storage/locales/bot/ar-SA.json b/storage/locales/bot/ar-SA.json index cfc77d3..4fd8cb6 100644 --- a/storage/locales/bot/ar-SA.json +++ b/storage/locales/bot/ar-SA.json @@ -34,7 +34,6 @@ "join": "اجعل البوت ينضم إلى قناتك الصوتية، أو حدد قناة معينة.", "leave": "اجعل البوت يغادر قناتك الصوتية الحالية.", "list": "اعرض قائمة الأغاني في قائمة انتظار قناتك الصوتية الحالية.", - "login": "تأكيد تسجيل دخول حسابك على الموقع.", "loop": "تفعيل/تعطيل تكرار قائمة الانتظار/الأغنية.", "lyrics": "عرض كلمات الأغنية المتزامنة من NodeLink.", "np": "اطلب اسم ورابط الأغنية التي تعمل حالياً.", @@ -74,9 +73,6 @@ "join": { "channel": "إشارة أو معرف أو اسم قناة صوتية للانضمام. الافتراضي: قناتك الحالية." }, - "login": { - "id": "المعرف الذي حصلت عليه من تسجيل الدخول في لوحة التحكم." - }, "loop": { "type": "يحدد ما يجب تبديل تكراره." }, @@ -255,11 +251,6 @@ "upNext": " ▶", "queueTitle": "🎧 قائمة الانتظار" }, - "login": { - "dashboardDisabled": "❌ لوحة التحكم غير مفعّلة في هذا البوت.", - "success": "✅ نجح تسجيل الدخول! يمكنك الآن المتابعة إلى صفحة الويب.", - "failed": "❌ فشل تسجيل الدخول! السبب: `{{error}}`. إذا كان هذا خطأ والمشكلة مستمرة، يرجى التواصل مع عضو فريق الدعم من خلال الخادم في وصفي." - }, "loop": { "invalidChoice": "'{{choice}}' غير صالح. استخدم `song` أو `queue`", "songActivated": "🔂 تم تفعيل تكرار الأغنية", diff --git a/storage/locales/bot/ckb.json b/storage/locales/bot/ckb.json index 4991535..3071809 100644 --- a/storage/locales/bot/ckb.json +++ b/storage/locales/bot/ckb.json @@ -34,7 +34,6 @@ "join": "بۆتەکە بکە بچێتە کەناڵی دەنگی خۆت، یان یەکێک دیاریبکە.", "leave": "بۆتەکە بکە کەناڵی دەنگی ئێستات بەجێبهێڵێت.", "list": "لیستی گۆرانییەکانی ڕیزبەندیی کەناڵی دەنگی ئێستات نیشان بدە.", - "login": "پشتڕاستکردنەوەی چوونەژوورەوەی ئەکاونتەکەت لە ماڵپەڕەکە.", "loop": "کردنەوە/داخستنی دووبارەکردنەوەی ڕیزبەندی/گۆرانی.", "lyrics": "دەقی گۆرانیی هاوئاهەنگ لە NodeLink نیشان بدە.", "np": "ناو و بەستەری گۆرانیی ئێستا داوا بکە.", @@ -74,9 +73,6 @@ "join": { "channel": "مەنتشن، ID، یان ناوی کەناڵێکی دەنگی بۆ پەیوەستبوون. بنەڕەتی: کەناڵی ئێستای تۆ." }, - "login": { - "id": "IDیەکەی لە کاتی چوونەژوورەوە لە داشبۆردەکە وەرگرتووە." - }, "loop": { "type": "دیاری دەکات کام لووپ بکرێتەوە." }, @@ -255,11 +251,6 @@ "upNext": " ▶", "queueTitle": "🎧 ڕیزبەندی" }, - "login": { - "dashboardDisabled": "❌ داشبۆردەکە لەم بۆتەکەدا چالاک نەکراوە.", - "success": "✅ چوونەژوورەوە سەرکەوتوو بوو! دەتوانیت بەردەوامبیت بۆ ماڵپەڕەکە.", - "failed": "❌ چوونەژوورەوە سەرکەوتوو نەبوو! هۆکار: `{{error}}`. ئەگەر ئەمە هەڵەیەکە و کێشەکە بەردەوامە، تکایە پەیوەندی بە ئەندامێکی تیمەوە بکە لە ڕێگەی سێرڤەرەکە لە وەسفەکەمدا." - }, "loop": { "invalidChoice": "'{{choice}}' دروست نییە. `song` یان `queue` بەکاربهێنە", "songActivated": "🔂 لووپی گۆرانی چالاک کرا", diff --git a/storage/locales/bot/de-DE.json b/storage/locales/bot/de-DE.json index 81854a0..cf74f31 100644 --- a/storage/locales/bot/de-DE.json +++ b/storage/locales/bot/de-DE.json @@ -34,7 +34,6 @@ "join": "Lass den Bot deinem Sprachkanal beitreten oder gib einen bestimmten an.", "leave": "Lass den Bot deinen aktuellen Sprachkanal verlassen.", "list": "Liste die Songs in der Warteschlange deines aktuellen Sprachkanals auf.", - "login": "Bestätige die Anmeldung deines Kontos auf der Website.", "loop": "Aktiviere/Deaktiviere die Schleife deiner Warteschlange/des Songs.", "lyrics": "Zeige synchronisierte Songtexte von NodeLink an.", "np": "Frage den Namen und die URL des aktuell spielenden Songs ab.", @@ -74,9 +73,6 @@ "join": { "channel": "Eine Sprachkanal-Erwähnung, ID oder Name zum Beitreten. Standard: dein aktueller Kanal." }, - "login": { - "id": "Die ID, die du beim Login im Dashboard erhalten hast." - }, "loop": { "type": "Bestimmt, welche Schleife umgeschaltet werden soll." }, @@ -255,11 +251,6 @@ "upNext": " ▶", "queueTitle": "🎧 Warteschlange" }, - "login": { - "dashboardDisabled": "❌ Das Dashboard ist auf diesem Bot nicht aktiviert.", - "success": "✅ Login erfolgreich! Du kannst jetzt auf der Webseite fortfahren.", - "failed": "❌ Login fehlgeschlagen! Grund: `{{error}}`. Wenn dies ein Fehler ist und das Problem besteht, wende dich an ein Teammitglied über den Server in meiner Beschreibung." - }, "loop": { "invalidChoice": "'{{choice}}' ist ungültig. Nutze `song` oder `queue`", "songActivated": "🔂 Song-Schleife aktiviert", diff --git a/storage/locales/bot/en.json b/storage/locales/bot/en.json index 737be91..8a97b16 100644 --- a/storage/locales/bot/en.json +++ b/storage/locales/bot/en.json @@ -34,7 +34,6 @@ "join": "Make the bot join your voice channel, or specify one.", "leave": "Make the bot leave your current voice channel.", "list": "List the songs in the queue of your current voice channel.", - "login": "Confirm a login of your account on the website.", "loop": "Toggle the looping of your queue/song.", "lyrics": "Display synced lyrics from NodeLink.", "np": "Request the name and url of the currently playing song.", @@ -74,9 +73,6 @@ "join": { "channel": "A voice channel mention, ID, or name to join. Defaults to your current channel." }, - "login": { - "id": "The id you got from logging in at the dashboard." - }, "loop": { "type": "Specifies what loop should be toggled." }, @@ -255,11 +251,6 @@ "upNext": " ▶", "queueTitle": "🎧 Queue" }, - "login": { - "dashboardDisabled": "❌ The dashboard is not enabled on this bot.", - "success": "✅ Login succeeded! You can continue to the webpage now.", - "failed": "❌ Login failed! Reason: `{{error}}`. If this is an error and the issue persists, please contact a team member through the server in my description." - }, "loop": { "invalidChoice": "'{{choice}}' is not valid. Use `song` or `queue`", "songActivated": "🔂 Song loop activated", diff --git a/storage/locales/bot/pt-BR.json b/storage/locales/bot/pt-BR.json index b04a2ef..f6558e0 100644 --- a/storage/locales/bot/pt-BR.json +++ b/storage/locales/bot/pt-BR.json @@ -34,7 +34,6 @@ "join": "Faça o bot entrar no seu canal de voz ou especifique um.", "leave": "Faça o bot sair do seu canal de voz atual.", "list": "Liste as músicas na fila do seu canal de voz atual.", - "login": "Confirme o login da sua conta no site.", "loop": "Ative/desative o loop da fila/música.", "lyrics": "Exiba letras sincronizadas do NodeLink.", "np": "Solicite o nome e a URL da música que está tocando atualmente.", @@ -74,9 +73,6 @@ "join": { "channel": "Menção, ID ou nome de um canal de voz para entrar. Padrão: seu canal atual." }, - "login": { - "id": "O ID que você obteve ao fazer login no painel." - }, "loop": { "type": "Especifica qual loop deve ser alternado." }, @@ -255,11 +251,6 @@ "upNext": " ▶", "queueTitle": "🎧 Fila" }, - "login": { - "dashboardDisabled": "❌ O painel não está habilitado neste bot.", - "success": "✅ Login bem-sucedido! Você pode continuar para a página web agora.", - "failed": "❌ Falha no login! Motivo: `{{error}}`. Se isso for um erro e o problema persistir, entre em contato com um membro da equipe através do servidor na minha descrição." - }, "loop": { "invalidChoice": "'{{choice}}' é inválido. Use `song` ou `queue`", "songActivated": "🔂 Loop de música ativado",