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
825 stars 170 forks source link

interaction cooldown #1351

Closed GisenTheCat closed 1 week ago

GisenTheCat commented 1 week ago

Which package has the bugs?

The core library

Issue description

there's a huge time between checkpoint 1 and 2

Code sample

require('dotenv').config();

const { Client } = require('discord.js-selfbot-v13');
const client = new Client();

client.on("messageCreate", (msg) => {
    if (msg.author.id === 'user id' && msg.content === 'go play some rps') {
        try {
            client.channels.fetch('channel id').then(async (channel) => {
                while (true) {
                    console.log('checkpoint 1');
                    await channel.sendSlash('bot id', 'rock paper scissors', 'rock');
                    console.log('checkpoint 2');
                }
            });
        } catch (error) {

        }
    }
});

client.login(process.env.TOKEN);

Package version

discord.js-selfbot-v13@3.4.2

Node.js version

v20.11.1

Operating system

Windows 11

Priority this issue should have

Medium (should be fixed soon)

Checklist

Additional Information

i think i reported this before but now i got a code sample am i alone with this problem?

aiko-chan-ai commented 1 week ago

It's not a bug, it's a feature

GisenTheCat commented 1 week ago

why and how do you remove the feature

aiko-chan-ai commented 1 week ago

remove "await"

GisenTheCat commented 1 week ago

it didn't work

aiko-chan-ai commented 1 week ago
while (true) {
                    console.log('checkpoint 1');
                    channel.sendSlash('bot id', 'rock paper scissors', 'rock');
                    console.log('checkpoint 2');
                }
aiko-chan-ai commented 1 week ago

If the bot doesn’t respond, each time 'await' is used, it will have a 5-second wait.

GisenTheCat commented 1 week ago

so there is no way to simply await the response and not wait the extra 5 seconds?

aiko-chan-ai commented 1 week ago

image

GisenTheCat commented 1 week ago

but then what if i want to interact with a command, like with a button, but i don't want to wait 5 seconds? because it seems to wait 5 seconds even if the bot responds in almost a second