discord.js-modules icon indicating copy to clipboard operation
discord.js-modules copied to clipboard

Broken Typings

Open Mattzi opened this issue 3 years ago • 3 comments

Issue description

Follow this guide https://discordjs.guide/interactions/registering-slash-commands.html#subcommands Build application using typescript

Cannot find name 'URLSearchParams' in RequestManager.d.ts:42

A simple import would fix this and I am unable to build my bot without this being fixed(Priority high because of this)

Code sample

import { REST } from '@discordjs/rest'

discord.js version

0.1.0-canary.0

Node.js version

17.1

Operating system

Windows 10

Priority this issue should have

High (immediate attention needed)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

GUILD_INTEGRATIONS, DIRECT_MESSAGES

Mattzi avatar Nov 09 '21 23:11 Mattzi

Could you try setting the dom option enabled in the lib configuration of tsconfig.json as described here

megatank58 avatar Nov 10 '21 00:11 megatank58

Well that fixed it for me but this cant be the final solution

Mattzi avatar Nov 10 '21 10:11 Mattzi

It can't, and surely won't be the final solution.

You can leave this ticket open. Mind you we are still on canary releases, so this can happen.

iCrawl avatar Nov 10 '21 10:11 iCrawl