aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots

Home Page:https://discordjs-self-v13.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cant create a MessageButton

AdamSaketume26 opened this issue · comments

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

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);

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

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

i installed package from github because npm version was out of date by 2 months

commented

you can't send buttons/select menu with selfbots

what about with webhooks?

commented

Only bots can send Components