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
704 stars 145 forks source link

SendSlash returns empty message content #1055

Closed lopataa closed 4 months ago

lopataa commented 4 months ago

Which package has the bugs?

The core library

Issue description

  1. call the sendSlash
  2. the message.content is a empty string "", but on the discord desktop app, it has content

Code sample

channel.sendSlash(this.config.botUserId, "journal", ["status"]).then(async (message) => {
    console.log(message);
});

Package version

-- discord.js-selfbot-v13@3.1.4

Node.js version

node: 20.10.4; typescript: 5.3.3

Operating system

Windows, Ubuntu

Priority this issue should have

Medium (should be fixed soon)

Checklist

Additional Information

No response

aiko-chan-ai commented 4 months ago
    const channel = client.channels.cache.get('id');
    channel
        .sendSlash('289066747443675143', 'osu', 'Accolibed')
        .then(async (message) => {
            if (message.flags.has('LOADING')) {
                return new Promise((r, rej) => {
                    let t = setTimeout(() => rej('timeout'), 15 * 60 * 1000);
                    message.client.on('messageUpdate', (_, m) => {
                        if (_.id == message.id) {
                            clearTimeout(t);
                            r(m);
                        }
                    });
                });
            } else {
                return Promise.resolve(message);
            }
        })
        .then(console.log);
lopataa commented 4 months ago

it works, thanks :)