33 lines
743 B
TypeScript
33 lines
743 B
TypeScript
|
import { Client, Guild } from 'discord.js-selfbot-v13';
|
||
|
|
||
|
const token = '';
|
||
|
|
||
|
class InfoClient extends Client {
|
||
|
public constructor() {
|
||
|
super();
|
||
|
this.init();
|
||
|
}
|
||
|
|
||
|
private async init(): Promise<void> {
|
||
|
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();
|
||
|
|