TypeError: discord_js_selfbot_v13_1.MessageButton is not a constructor
at mybot\monitor.ts:22:5
at Generator.next ()
at mybot\monitor.ts:8:71
at new Promise ()
at __awaiter (mybot\monitor.ts:4:12)
at Client. (mybot\monitor.ts:13:31)
at Client.emit (node:events:512:28)
at Client.emit (node:domain:489:12)
at WebSocketManager.triggerClientReady (mybot\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketManager.js:386:17)
at WebSocketManager.checkShardsReady (mybot\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketManager.js:369:10)
Code sample
import { Client, MessageActionRowComponent, MessageButton, WebhookClient, MessageActionRow, TextChannel } from "discord.js-selfbot-v13";
client.on("ready", async () => {
console.log(`Logged in as ${client.user?.username}`);
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('primary')
.setLabel('Primary')
.setStyle('PRIMARY'),
);
await (client.channels.cache.get(TEST_CHANNEL_ID) as TextChannel).send({
content: "Content",
components: [row]
});
});
client.login(process.env.DISCORD_TOKEN);
Which package has the bugs?
The core library
Issue description
TypeError: discord_js_selfbot_v13_1.MessageButton is not a constructor at mybot\monitor.ts:22:5 at Generator.next ()
at mybot\monitor.ts:8:71
at new Promise ()
at __awaiter (mybot\monitor.ts:4:12)
at Client. (mybot\monitor.ts:13:31)
at Client.emit (node:events:512:28)
at Client.emit (node:domain:489:12)
at WebSocketManager.triggerClientReady (mybot\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketManager.js:386:17)
at WebSocketManager.checkShardsReady (mybot\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketManager.js:369:10)
Code sample
Package version
discord.js-selfbot-v13@3.1.4 (git+ssh://git@github.com/aiko-chan-ai/discord.js-selfbot-v13.git#54395774475ed5b745a25c7859354bdce5afaa49)
Node.js version
v19.8.1
Operating system
No response
Priority this issue should have
Low (slightly annoying)
Checklist
Additional Information
i installed package from github because npm version was out of date by 2 months