feat: more readable time delta #193
3 changed files with 9 additions and 3 deletions
|
@ -131,3 +131,8 @@ export const emojiPng = (emoji: string) =>
|
||||||
`https://cdn.jsdelivr.net/gh/twitter/twemoji/assets/72x72/${emoji
|
`https://cdn.jsdelivr.net/gh/twitter/twemoji/assets/72x72/${emoji
|
||||||
.codePointAt(0)
|
.codePointAt(0)
|
||||||
?.toString(16)}.png`;
|
?.toString(16)}.png`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Blank character
|
||||||
|
*/
|
||||||
|
export const blank = "\u200b";
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { EmbedBuilder } from "@discordjs/builders";
|
||||||
import { GuildQueue, QueueRepeatMode } from "discord-player";
|
import { GuildQueue, QueueRepeatMode } from "discord-player";
|
||||||
import { Client } from "discord.js";
|
import { Client } from "discord.js";
|
||||||
import { getLocale } from "./locales";
|
import { getLocale } from "./locales";
|
||||||
|
import { blank } from "./misc";
|
||||||
|
|
||||||
export const embedListQueue = (
|
export const embedListQueue = (
|
||||||
client: Client,
|
client: Client,
|
||||||
|
@ -30,7 +31,7 @@ export const embedListQueue = (
|
||||||
? loc.get("c_queue10")
|
? loc.get("c_queue10")
|
||||||
: (idx === 1 && page === 1) || (idx === 0 && page > 1)
|
: (idx === 1 && page === 1) || (idx === 0 && page > 1)
|
||||||
? loc.get("c_queue11")
|
? loc.get("c_queue11")
|
||||||
: "\u200b";
|
: blank;
|
||||||
const idx_track = now_playing ? "" : `${idx + limit_fields * (page - 1)}. `;
|
const idx_track = now_playing ? "" : `${idx + limit_fields * (page - 1)}. `;
|
||||||
embed.addFields({
|
embed.addFields({
|
||||||
name,
|
name,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Client, Colors, EmbedBuilder, User } from "discord.js";
|
import { Client, Colors, EmbedBuilder, User } from "discord.js";
|
||||||
import { getLocale } from "./locales";
|
import { getLocale } from "./locales";
|
||||||
import { cleanCodeBlock } from "./misc";
|
import { blank, cleanCodeBlock } from "./misc";
|
||||||
import { showDate, strToSeconds, timeDeltaToString } from "./time";
|
import { showDate, strToSeconds, timeDeltaToString } from "./time";
|
||||||
import { RegexC, RegExpFlags } from "./regex";
|
import { RegexC, RegExpFlags } from "./regex";
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ export const embedListReminders = async (
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
embed.addFields({
|
embed.addFields({
|
||||||
name: "\u200b",
|
name: blank,
|
||||||
value: `${loc.get("c_reminder10")}${page} ${loc.get("c_reminder11")}.`,
|
value: `${loc.get("c_reminder10")}${page} ${loc.get("c_reminder11")}.`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue