From 92d22d7ef0b8f2f71ddc01b48a910d4999c1f0e3 Mon Sep 17 00:00:00 2001 From: Joren Date: Fri, 28 Jun 2024 00:51:24 +0200 Subject: [PATCH] first commit --- index.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 index.ts diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..b2fdb80 --- /dev/null +++ b/index.ts @@ -0,0 +1,32 @@ +import { Client, Guild } from 'discord.js-selfbot-v13'; + +const token = ''; + +class InfoClient extends Client { + public constructor() { + super(); + this.init(); + } + + private async init(): Promise { + this.once('ready', () => this.onReady()); + await this.login(token); + } + + private onReady(): void { + console.log(`Logged in as ${this.user?.tag}!`); + + this.guilds.cache.forEach((guild: Guild) => { + console.log(`Guild: ${guild}`); + const channels = guild.channels.cache; + console.log(`There are ${channels.size} channels in the guild.`); + channels.forEach(channel => { + console.log(`- ${channel.name} (${channel.type} ${channel.id})`); + }); + }); + process.exit(); + } +} + +new InfoClient(); +