mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-18 07:23:17 +08:00
Merge pull request #46 from zaakirio/feat/host-i18n-en
feat(i18n): add English support for host-side chat messages
This commit is contained in:
commit
3741dd8fd9
78 changed files with 2290 additions and 1000 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { createHash } from 'node:crypto';
|
||||
import { t } from '../shared/i18n.mjs';
|
||||
|
||||
const DEFAULT_BASE_URL = 'https://discord.com/api/v10/';
|
||||
const DEFAULT_FILE_UPLOAD_TIMEOUT_MS = 120_000;
|
||||
|
|
@ -298,7 +299,7 @@ export async function inspectDiscordToken(token, options = {}) {
|
|||
if (!bot?.id || bot?.bot !== true) throw new Error('Discord token does not belong to a bot');
|
||||
return {
|
||||
platformId: String(bot.id),
|
||||
name: cleanString(bot.global_name) ?? cleanString(bot.username) ?? 'Discord机器人',
|
||||
name: cleanString(bot.global_name) ?? cleanString(bot.username) ?? t('Discord机器人'),
|
||||
username: cleanString(bot.username),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue