import discord from discord import app_commands intents = discord.Intents.default() intents.members = True intents.message_content = True class Bot(discord.Client): def __init__(self, *, intents: discord.Intents): super().__init__(intents=intents) self.tree = app_commands.CommandTree(self) async def setup_hook(self): await self.tree.sync()