/ bot.py
bot.py
 1  import discord
 2  from discord import app_commands
 3  
 4  from config import DISCORD_TOKEN
 5  from commands import kayit, nick, oyuncular, sunucu
 6  
 7  
 8  class SurvivalBot(discord.Client):
 9      def __init__(self):
10          intents = discord.Intents.default()
11          super().__init__(intents=intents)
12          self.tree = app_commands.CommandTree(self)
13  
14      async def setup_hook(self):
15          kayit.register(self.tree)
16          nick.register(self.tree)
17          oyuncular.register(self.tree)
18          sunucu.register(self.tree)
19          await self.tree.sync()
20  
21  
22  bot = SurvivalBot()
23  bot.run(DISCORD_TOKEN)