Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm upgrade #105

Closed
wants to merge 1 commit into from
Closed

npm upgrade #105

wants to merge 1 commit into from

Conversation

chfuchte
Copy link
Collaborator

@chfuchte chfuchte commented Jul 3, 2024

@typescript-eslint/no-misused-promises offed as well as it don't allowes async arrow functions as args for discord.js event handler

@chfuchte chfuchte marked this pull request as draft July 3, 2024 17:20
@chfuchte
Copy link
Collaborator Author

chfuchte commented Jul 3, 2024

seems like we cantseams like discord.js can not be updated with our tsconfig

@EinsKatze
Copy link
Collaborator

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.

@EinsKatze
Copy link
Collaborator

Also, in the discord.js repo there is a issue for this. discordjs/discord.js#9783
Using Typescript V5 seems to be the fix.

@EinsKatze
Copy link
Collaborator

EinsKatze commented Jul 3, 2024

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

@EinsKatze
Copy link
Collaborator

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

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.

@EinsKatze
Copy link
Collaborator

EinsKatze commented Jul 3, 2024

Have done most of the changes mentioned, in my fork. (EinsKatze@f863640)

Don't know how to fix blackjack issue rn

@chfuchte
Copy link
Collaborator Author

chfuchte commented Jul 4, 2024

Thanks for the research @EinsKatze

@EinsKatze
Copy link
Collaborator

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.

@chfuchte
Copy link
Collaborator Author

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)

@chfuchte chfuchte marked this pull request as ready for review July 13, 2024 18:18
@chfuchte chfuchte closed this Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants