discord.js-selfbot-v13 icon indicating copy to clipboard operation
discord.js-selfbot-v13 copied to clipboard

channel.leave not working, and ITS SILENT not SLIENT.

Open sqlu opened this issue 5 months ago • 0 comments

Which package has the bugs?

The core library

Issue description

.

Code sample

import { time } from 'discord.js';
import { GroupDMChannel } from 'discord.js-selfbot-v13';
import { MessageCommand } from '../../src/types/interactions';

export const messageCommand: MessageCommand = {
  async execute(_selfbot, selfbotUser, message, _args: string[]) {
    const now = Math.floor(Date.now() / 1000);
    if (message.channel.type !== 'GROUP_DM') {
      await message.edit({
        content:
          selfbotUser.lang === 'fr'
            ? `**Vous devez être dans un groupe pour utiliser cette commande!**\n-# ➜ *Suppression du message ${time(now + 16, 'R')}*`
            : `**You must be in a group to use this command!**\n-# ➜ *Deleting message ${time(now + 16, 'R')}*`,
      });
      return;
    }

    const channel = message.channel as GroupDMChannel;
    await message.delete();
    await channel.leave(true)
    return;
  },
};

Package version

3.6.1

Node.js version

LTS VERSION 22

Operating system

Windows

Priority this issue should have

Low (slightly annoying)

Checklist

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

Additional Information

No response

sqlu avatar Jun 01 '25 12:06 sqlu