Okay, so I’m using discord.js 14.7.1 and I wrote a MessageBuilder
class inside of my code (since I use functions to separate everything and simply using var a = new Discord.Message()
no longer works for the autocorrect in vscode. Here’s what it looks like:
class MessageBuilder {
constructor(){};
activity = Discord.MessageActivityType | null;
applicationId = Snowflake | null;
attachments = Collection(Snowflake(), Attachment());
author = Discord.User;
get bulkDeletable() {return false};
get channel(){return Discord.TextChannel()};
channelId = Snowflake;
get cleanContent(){return String()};
components = Discord.ActionRow;
content = String();
get createdAt(){return Date()};
createdTimestamp = Number();
get crosspostable() {Boolean};
get deletable() {Boolean};
get editable() {Boolean};
get editedAt() {return Date() || null};
editedTimestamp = Number() || null;
embeds = Array(Discord.Embed());
groupActivityApplication = Discord.ClientApplication | null;
guildId = Discord.Guild() || null;
get guild() {return Discord.Guild() || null};
get hasThread() {return Boolean};
id = Snowflake;
interaction = Discord.BaseInteraction() || null;
get member() {return Discord.GuildMember() || null};
mentions = Discord.MessageMentions();
nonce = String() | Number() | null;
get partial() {return false};
get pinnable() {return Boolean()};
pinned = Boolean();
reactions = Discord.ReactionManager();
stickers = Collection(Snowflake, Discord.Sticker());
position = Number() || null;
system = Boolean();
get thread() {Discord.ThreadChannel() || null};
tts = Boolean();
type = Discord.MessageType;
get url() {return String()};
webhookId = Snowflake || null;
flags = Discord.MessageFlagsBitField.Flags;
reference = Discord.Message() || null;
}
Now, I get it, it’s a mess (it was taken mostly from discord’s code and changed to work for js instead of typescript. Here’s the error that glitch shows:
It’s just a slight annoyance since it’s not an error and works perfectly fine.