add url
All checks were successful
PR Check / lint-and-format (pull_request) Successful in 19s

This commit is contained in:
Mylloon 2024-09-27 20:53:50 +02:00
parent 2cc6c0bd74
commit 1b09f449b2
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
6 changed files with 10 additions and 2 deletions

View file

@ -49,6 +49,7 @@ export default {
// Load all the command per categories
// TODO: Check if the command exist in the context (guild)
// TODO: List subcommands too
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/47
client.commands.categories.forEach((commands_name, category) => {
const commands = commands_name.reduce((data, command_name) => {
return data + `\`/${command_name}\`, `;
@ -74,6 +75,7 @@ export default {
// If a command is specified
// TODO: Check if the command exist in the context (guild)
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/187
const command = client.commands.list.get(desired_command);
if (!command) {
// Command don't exist

View file

@ -152,9 +152,10 @@ export default {
const limit_desc = 4096;
const nb_embed = Math.ceil(title.plainLyrics.length / limit_desc);
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/186
// TODO: If lyrics < 6000, only send one message with multiples embed
for (let i = 0, j = 0; i < nb_embed; i++, j += limit_desc) {
// TODO: Better cut in lyrics
// + Better cut in lyrics
const lyrics = title.plainLyrics.slice(j, j + limit_desc);
let embed;

View file

@ -178,6 +178,7 @@ export default {
// TODO: When added to an existing queue (size of queue > 0):
// - Add position in queue
// - Add estimated time until playing
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/184
return await interaction.followUp({
content: `⏱️ | \`${title}\` ${loc.get("c_play5")}.`,
});

View file

@ -72,6 +72,7 @@ export default {
// Specified ID
// TODO?: ID range -> as a string: 5-8 remove 5, 6, 7, 8
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/185
.addNumberOption((option) =>
option
.setName(loc_default.get(`c_${filename}_sub3_opt1_name`)!.toLowerCase())

View file

@ -118,7 +118,9 @@ export default async (message: Message, client: Client) => {
quoted_post.attachments.forEach((file) => (files += `[${file.name}](${file.url}), `));
embed.addFields({
// TODO: Don't pluralize when there is only one file.
// TODO: Locales
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/188
name: "Fichiers joints",
// TODO: Check if don't exceed char limit, if yes, split
// files into multiples field.

View file

@ -100,7 +100,8 @@ export const strToSeconds = (time: string) => {
*/
export const timeDeltaToString = (time: number) => {
const now = Date.now();
// TODO adapt the output and not always parse the time as seconds
// TODO: adapt the output and not always parse the time as seconds
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/189
// Use Intl.RelativeTimeFormat ?
return `${strToSeconds(`${(now - time) / 1000}`)} secs`;
};