import discord
from discord.ext import commands
class ABot(commands.Bot):
def __init__(self):
super().__init__(
intents=discord.Intents.all()
)
async def on_ready(self):
print(f"{__class__.__name__} Ready")
async def setup_hook(self) -> None:
await self.tree.sync(guild=discord.Object(id=id_of_guild))
@discord.app_commands.command(name="test")
async def test(self, interaction:discord.Interaction):
await interaction.response.send_message("Hello")
ABot().run(token="TOKENİNİ YAZ")