Closed chfuchte closed 1 month ago
seems like we cantseams like discord.js can not be updated with our tsconfig
Running npm audit fix --force
seems to work (at least in my case), to upgrade some things.
Might be worth to do that first, then figure out how to upgrade further.
Also, in the discord.js repo there is a issue for this. https://github.com/discordjs/discord.js/issues/9783 Using Typescript V5 seems to be the fix.
Also, in the discord.js repo there is a issue for this. discordjs/discord.js#9783 Using Typescript V5 seems to be the fix.
Seems to work (for me), but a few files are using functions which seem to work different in discord.js now.
interaction.options.getMember()
and interaction.options.getUser()
does not exist anymore (docs say otherwise tho) and is used in:
src/action/blackjack/registerCommands.ts:24
src/commands/clear.ts:4
src/commands/history.ts:2
src/commands/rename.ts:25
src/commands/strike.ts:29
src/commands/ticket-add.ts:2
src/commands/warn.ts:30
Also, in the discord.js repo there is a issue for this. discordjs/discord.js#9783 Using Typescript V5 seems to be the fix.
Seems to work (for me), but a few files are using functions which seem to work different in discord.js now.
interaction.options.getMember()
andinteraction.options.getUser()
does not exist anymore (docs say otherwise tho) and is used in:src/action/blackjack/registerCommands.ts:24 src/commands/clear.ts:4 src/commands/history.ts:2 src/commands/rename.ts:25 src/commands/strike.ts:29 src/commands/ticket-add.ts:2 src/commands/warn.ts:30
We need to Switch the line async execute(interaction: CommandInteraction)
to async execute(interaction: ChatInputCommandInteraction)
.
There is a different error in src/action/blackjack/registerCommands.ts:24 tho, which is different from the interaction options mentioned above.
Have done most of the changes mentioned, in my fork. (https://github.com/EinsKatze/FloBot/commit/f863640c6c8363071f0094dc272875524f239f78)
Don't know how to fix blackjack issue rn
Thanks for the research @EinsKatze
I fixed the Blackjack issue now in my fork aswell but had to deactivate a eslint rule. The Rule seems to do weird things with promises in the new TS version idk.
I fixed the Blackjack issue now in my fork aswell but had to deactivate a eslint rule. The Rule seems to do weird things with promises in the new TS version idk.
yes, I had to disable it as well (see first commit here)
@typescript-eslint/no-misused-promises offed as well as it don't allowes async arrow functions as args for discord.js event handler