mirror of
https://github.com/complexcaresolutions/telegram-media-bot.git
synced 2026-03-17 15:03:42 +00:00
fix: escape tilde in rate-limit status to avoid MarkdownV2 strikethrough
~ is strikethrough in MarkdownV2, so "~5m 46s" breaks parsing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6bd531e5fc
commit
64fbe737dc
1 changed files with 1 additions and 1 deletions
|
|
@ -394,7 +394,7 @@ export function registerHandlers(bot: Bot<BotContext>): void {
|
||||||
const mins = Math.floor(secs / 60);
|
const mins = Math.floor(secs / 60);
|
||||||
const rest = secs % 60;
|
const rest = secs % 60;
|
||||||
const timeStr = mins > 0 ? `${mins}m ${rest}s` : `${secs}s`;
|
const timeStr = mins > 0 ? `${mins}m ${rest}s` : `${secs}s`;
|
||||||
apiStatus = `\ud83d\udfe1 Rate\\-Limit \\(frei in ~${escapeMarkdown(timeStr)}\\)`;
|
apiStatus = `\ud83d\udfe1 Rate\\-Limit \\(frei in \\~${escapeMarkdown(timeStr)}\\)`;
|
||||||
} else if (health.status === 'auth_error') {
|
} else if (health.status === 'auth_error') {
|
||||||
apiStatus = '\ud83d\udd34 Anmeldefehler';
|
apiStatus = '\ud83d\udd34 Anmeldefehler';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue