fix: docker (#190)
Some checks failed
Publish latest version / build (push) Failing after 1m4s

Reviewed-on: #190
Co-authored-by: Mylloon <kennel.anri@tutanota.com>
Co-committed-by: Mylloon <kennel.anri@tutanota.com>
This commit is contained in:
Mylloon 2024-09-27 21:21:30 +02:00 committed by Mylloon
parent 2cc6c0bd74
commit 2ac611dab7
Signed by: Forgejo
GPG key ID: E72245C752A07631
8 changed files with 12 additions and 4 deletions

View file

@ -6,4 +6,4 @@
!LICENSE
!tsconfig.json
src/tests
src/tests/

View file

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
FROM node:22.8-bullseye-slim
FROM node:22.9-bullseye-slim
ENV DOCKERIZED=1
RUN mkdir /config && \

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`;
};