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

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
834 stars 172 forks source link

Cant create a MessageButton #1142

Closed AdamSaketume26 closed 7 months ago

AdamSaketume26 commented 7 months ago

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

Additional Information

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

002-sans commented 7 months ago

you can't send buttons/select menu with selfbots

AdamSaketume26 commented 7 months ago

what about with webhooks?

002-sans commented 7 months ago

Only bots can send Components