Skip to content

Commit 6aa637d

Browse files
author
HunteRoi
committed
Upgrade dependencies and adapt code
Upgrade DiscordJS, discord-verification, discord-selfrole and discord-temp-channels then adapt code accordingly (ephemeral messages are marked with the flags property, ready event becomes clientReady). Drop SendGrid in favor of SMTP2Go. Remove "pin" command.
1 parent 1eb6a39 commit 6aa637d

19 files changed

Lines changed: 799 additions & 581 deletions

#.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ POSTGRES_PASSWORD=
33
DATABASE_PORT=5432
44
DATABASE_HOST=localhost
55
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${POSTGRES_DB}?schema=public
6-
SENDGRID_API_KEY=
6+
SMTP2GO_API_KEY=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ POSTGRES_PASSWORD=
1919
DATABASE_PORT=5432
2020
DATABASE_HOST=localhost
2121
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${POSTGRES_DB}?schema=public
22-
SENDGRID_API_KEY=
22+
SMTP2GO_API_KEY=
2323
```
2424
An empty copy of this file is available as [#.env.development](./#.env.development).
2525

config.development.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@
145145
},
146146
"communicationServiceOptions": {
147147
"mailData": {
148-
"from": "mdpdevti@henallux.be",
149-
"templateId": "d-c8892944b4f2417bafece2d7a5b73d1f"
148+
"from": "fctienoreplydiscord@henallux.be",
149+
"templateId": "9131196"
150150
}
151151
}
152152
}

config.production.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@
157157
},
158158
"communicationServiceOptions": {
159159
"mailData": {
160-
"from": "mdpdevti@henallux.be",
161-
"templateId": "d-ae8dfdd7cc9c49f1af6e016ecbb4d856"
160+
"from": "fctienoreplydiscord@henallux.be",
161+
"templateId": "9131196"
162162
}
163163
}
164164
}

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "datadrop",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"type": "module",
55
"main": "./build/index.js",
66
"scripts": {
@@ -23,20 +23,20 @@
2323
},
2424
"homepage": "https://github.com/section-IG/DataDrop#readme",
2525
"dependencies": {
26-
"@dotenvx/dotenvx": "^1.21.1",
26+
"@dotenvx/dotenvx": "^1.51.0",
2727
"@hunteroi/advanced-logger": "^0.2.0",
28-
"@hunteroi/discord-selfrole": "^4.0.4",
29-
"@hunteroi/discord-temp-channels": "^3.3.0",
30-
"@hunteroi/discord-verification": "^1.5.0",
31-
"@sendgrid/mail": "8.1.3",
32-
"discord-sync-commands": "^0.3.0",
33-
"discord.js": "^14.16.2",
28+
"@hunteroi/discord-selfrole": "^4.0.5",
29+
"@hunteroi/discord-temp-channels": "^3.3.1",
30+
"@hunteroi/discord-verification": "^1.5.2",
31+
"smtp2go-nodejs": "^0.3.5",
32+
"discord-sync-commands": "^0.5.2",
33+
"discord.js": "^14.22.1",
3434
"ts-postgres": "1.3.0"
3535
},
3636
"devDependencies": {
37-
"@biomejs/biome": "^1.9.4",
38-
"@types/node": "^20.12.7",
39-
"tsx": "^4.19.2",
40-
"typescript": "^5.4.4"
37+
"@biomejs/biome": "^2.2.4",
38+
"@types/node": "^24.5.2",
39+
"tsx": "^4.20.5",
40+
"typescript": "^5.9.2"
4141
}
4242
}

src/commands/admins/announce.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Colors,
88
EmbedBuilder,
99
InteractionContextType,
10+
MessageFlags,
1011
PermissionFlagsBits,
1112
SlashCommandBuilder,
1213
type TextChannel,
@@ -63,7 +64,7 @@ export default {
6364
"Ceci est une preview de l'annonce. Voulez-vous l'envoyer?",
6465
components: [row],
6566
embeds: [embed],
66-
ephemeral: true,
67+
flags: MessageFlags.Ephemeral
6768
});
6869

6970
try {

src/commands/others/link.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
ButtonBuilder,
44
ButtonStyle,
55
type ChatInputCommandInteraction,
6+
MessageFlags,
67
SlashCommandBuilder,
78
} from "discord.js";
89

@@ -25,7 +26,7 @@ export default {
2526
await interaction.reply({
2627
content:
2728
"❌ **Oups!** - Tu as déjà lié ton compte Hénallux avec ton compte Discord!",
28-
ephemeral: true,
29+
flags: MessageFlags.Ephemeral,
2930
});
3031
return;
3132
}
@@ -43,7 +44,7 @@ export default {
4344
await interaction.reply({
4445
content: `Pour lier ton compte, rien de plus simple! Il te suffit de cliquer sur le bouton ci-dessous et remplir le formulaire! Tu recevras un code par email qu'il faudra envoyer ici ensuite!\n⚠️ Nous conservons les informations soumises après utilisation. Si tu soumets tes informations, tu acceptes que celles-ci nous soient transmises et que nous les conservions durant toute la durée de ta présence sur le serveur!`,
4546
components: [buttonComponent],
46-
ephemeral: true,
47+
flags: MessageFlags.Ephemeral,
4748
});
4849
},
4950
} as Command;

src/commands/others/pin.ts

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/commands/owner/eval.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
type ChatInputCommandInteraction,
3+
MessageFlags,
34
PermissionFlagsBits,
45
SlashCommandBuilder,
56
codeBlock,
@@ -32,7 +33,7 @@ export default {
3233
await interaction.reply({
3334
content:
3435
"❌ **Oups!** - Vous n'êtes pas autorisé à utiliser cette commande.",
35-
ephemeral: true,
36+
flags: MessageFlags.Ephemeral,
3637
});
3738
return;
3839
}

src/commands/owner/reload.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
type ChatInputCommandInteraction,
3+
MessageFlags,
34
PermissionFlagsBits,
45
SlashCommandBuilder,
56
} from "discord.js";
@@ -24,7 +25,7 @@ export default {
2425
await interaction.reply({
2526
content:
2627
"❌ **Oups!** - Vous n'êtes pas autorisé à utiliser cette commande.",
27-
ephemeral: true,
28+
flags: MessageFlags.Ephemeral,
2829
});
2930
return;
3031
}
@@ -33,7 +34,7 @@ export default {
3334
await client.reloadConfig();
3435
await interaction.reply({
3536
content: "Rechargement de la configuration en cours... 👌",
36-
ephemeral: true,
37+
flags: MessageFlags.Ephemeral,
3738
});
3839
},
3940
} as Command;

0 commit comments

Comments
 (0)