bluescorpian519
bluescorpian5195mo ago

Deno Vscode type checking randomly gets wrong types for discord.js EmbedBuilder

export class EmbedBuilder extends BuildersEmbed {
public constructor(data?: EmbedData | APIEmbed);
public override setColor(color: ColorResolvable | null): this;
public static from(other: JSONEncodable<APIEmbed> | APIEmbed): EmbedBuilder;
public get length(): number;
}
export class EmbedBuilder extends BuildersEmbed {
public constructor(data?: EmbedData | APIEmbed);
public override setColor(color: ColorResolvable | null): this;
public static from(other: JSONEncodable<APIEmbed> | APIEmbed): EmbedBuilder;
public get length(): number;
}
EmbedBuilder in discord.js extends BuildersEmbed, but randomly (cant figure out what causes it) while developing, deno decides EmbedBuilder is not extending any other class, and only the setColor, etc methods are available, and opening the type file, the setColor method has this error This member cannot have an override modifier because its containing class does not extend another class. which is clearly untrue. Running deno check results in no errors. My import import { WebhookClient, EmbedBuilder } from "npm:discord.js"; Reloading the vscode window fixes the issue
2 Replies
piton
piton5mo ago
bump! @bluescorpian519 i've fixed this issue by removing node_modules folder, downgrading to 2.0.0 and installing the modules back again
bluescorpian519
bluescorpian519OP5mo ago
thanks a lot, I will try that if I encounter the issue again.

Did you find this page helpful?