-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_channels.py
More file actions
36 lines (29 loc) · 976 Bytes
/
debug_channels.py
File metadata and controls
36 lines (29 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Quick debug script to see what servers and channels the bot can access
"""
import os
import asyncio
from dotenv import load_dotenv
import discord
load_dotenv()
TOKEN = os.getenv("DISCORD_TOKEN")
async def main():
intents = discord.Intents.default()
intents.message_content = False
intents.members = False
intents.presences = False
client = discord.Client(intents=intents)
@client.event
async def on_ready():
print(f"Bot logged in as: {client.user.name}")
print(f"Bot ID: {client.user.id}")
print()
print(f"Bot is in {len(client.guilds)} server(s):")
for guild in client.guilds:
print(f"\nServer: {guild.name} (ID: {guild.id})")
print(f" Text channels:")
for channel in guild.text_channels:
print(f" - #{channel.name} (ID: {channel.id})")
await client.close()
await client.start(TOKEN)
asyncio.run(main())