fix: docker (#191)
All checks were successful
Publish latest version / build (push) Successful in 1m30s
All checks were successful
Publish latest version / build (push) Successful in 1m30s
Reviewed-on: #191 Co-authored-by: Mylloon <kennel.anri@tutanota.com> Co-committed-by: Mylloon <kennel.anri@tutanota.com>
This commit is contained in:
parent
2cc6c0bd74
commit
f9cc154b04
9 changed files with 13 additions and 4 deletions
|
@ -6,4 +6,4 @@
|
||||||
!LICENSE
|
!LICENSE
|
||||||
!tsconfig.json
|
!tsconfig.json
|
||||||
|
|
||||||
src/tests
|
src/tests/
|
||||||
|
|
|
@ -32,5 +32,6 @@ jobs:
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
context: .
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM node:22.8-bullseye-slim
|
FROM node:22.9-bullseye-slim
|
||||||
|
|
||||||
ENV DOCKERIZED=1
|
ENV DOCKERIZED=1
|
||||||
RUN mkdir /config && \
|
RUN mkdir /config && \
|
||||||
|
|
|
@ -49,6 +49,7 @@ export default {
|
||||||
// Load all the command per categories
|
// Load all the command per categories
|
||||||
// TODO: Check if the command exist in the context (guild)
|
// TODO: Check if the command exist in the context (guild)
|
||||||
// TODO: List subcommands too
|
// TODO: List subcommands too
|
||||||
|
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/47
|
||||||
client.commands.categories.forEach((commands_name, category) => {
|
client.commands.categories.forEach((commands_name, category) => {
|
||||||
const commands = commands_name.reduce((data, command_name) => {
|
const commands = commands_name.reduce((data, command_name) => {
|
||||||
return data + `\`/${command_name}\`, `;
|
return data + `\`/${command_name}\`, `;
|
||||||
|
@ -74,6 +75,7 @@ export default {
|
||||||
|
|
||||||
// If a command is specified
|
// If a command is specified
|
||||||
// TODO: Check if the command exist in the context (guild)
|
// 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);
|
const command = client.commands.list.get(desired_command);
|
||||||
if (!command) {
|
if (!command) {
|
||||||
// Command don't exist
|
// Command don't exist
|
||||||
|
|
|
@ -152,9 +152,10 @@ export default {
|
||||||
const limit_desc = 4096;
|
const limit_desc = 4096;
|
||||||
const nb_embed = Math.ceil(title.plainLyrics.length / limit_desc);
|
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
|
// TODO: If lyrics < 6000, only send one message with multiples embed
|
||||||
for (let i = 0, j = 0; i < nb_embed; i++, j += limit_desc) {
|
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);
|
const lyrics = title.plainLyrics.slice(j, j + limit_desc);
|
||||||
|
|
||||||
let embed;
|
let embed;
|
||||||
|
|
|
@ -178,6 +178,7 @@ export default {
|
||||||
// TODO: When added to an existing queue (size of queue > 0):
|
// TODO: When added to an existing queue (size of queue > 0):
|
||||||
// - Add position in queue
|
// - Add position in queue
|
||||||
// - Add estimated time until playing
|
// - Add estimated time until playing
|
||||||
|
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/184
|
||||||
return await interaction.followUp({
|
return await interaction.followUp({
|
||||||
content: `⏱️ | \`${title}\` ${loc.get("c_play5")}.`,
|
content: `⏱️ | \`${title}\` ${loc.get("c_play5")}.`,
|
||||||
});
|
});
|
||||||
|
|
|
@ -72,6 +72,7 @@ export default {
|
||||||
|
|
||||||
// Specified ID
|
// Specified ID
|
||||||
// TODO?: ID range -> as a string: 5-8 remove 5, 6, 7, 8
|
// TODO?: ID range -> as a string: 5-8 remove 5, 6, 7, 8
|
||||||
|
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/185
|
||||||
.addNumberOption((option) =>
|
.addNumberOption((option) =>
|
||||||
option
|
option
|
||||||
.setName(loc_default.get(`c_${filename}_sub3_opt1_name`)!.toLowerCase())
|
.setName(loc_default.get(`c_${filename}_sub3_opt1_name`)!.toLowerCase())
|
||||||
|
|
|
@ -118,7 +118,9 @@ export default async (message: Message, client: Client) => {
|
||||||
quoted_post.attachments.forEach((file) => (files += `[${file.name}](${file.url}), `));
|
quoted_post.attachments.forEach((file) => (files += `[${file.name}](${file.url}), `));
|
||||||
embed.addFields({
|
embed.addFields({
|
||||||
// TODO: Don't pluralize when there is only one file.
|
// TODO: Don't pluralize when there is only one file.
|
||||||
|
|
||||||
// TODO: Locales
|
// TODO: Locales
|
||||||
|
// https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/188
|
||||||
name: "Fichiers joints",
|
name: "Fichiers joints",
|
||||||
// TODO: Check if don't exceed char limit, if yes, split
|
// TODO: Check if don't exceed char limit, if yes, split
|
||||||
// files into multiples field.
|
// files into multiples field.
|
||||||
|
|
|
@ -100,7 +100,8 @@ export const strToSeconds = (time: string) => {
|
||||||
*/
|
*/
|
||||||
export const timeDeltaToString = (time: number) => {
|
export const timeDeltaToString = (time: number) => {
|
||||||
const now = Date.now();
|
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 ?
|
// Use Intl.RelativeTimeFormat ?
|
||||||
return `${strToSeconds(`${(now - time) / 1000}`)} secs`;
|
return `${strToSeconds(`${(now - time) / 1000}`)} secs`;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue