joytou commited on
Commit
b442dbe
·
1 Parent(s): b2b1794
Files changed (1) hide show
  1. discord_bot.py +4 -5
discord_bot.py CHANGED
@@ -29,8 +29,8 @@ check_functions = {
29
 
30
  intents = discord.Intents.default()
31
  intents.message_content = True
32
- #bot = commands.Bot(command_prefix='>', intents=intents)
33
- #tree = bot.tree
34
 
35
 
36
  with open("discord.json", "r") as f:
@@ -165,8 +165,7 @@ class MyClient(discord.Client):
165
  print(x)
166
  print(y)
167
  await interaction.response.send_message(f"x: {x}, y: {y}")
168
- intents = discord.Intents.default()
169
- bot = MyClient(intents=intents)
170
 
171
 
172
 
@@ -177,7 +176,7 @@ async def ping(ctx):
177
 
178
  @bot.event
179
  async def on_ready():
180
- #await tree.sync()
181
  await bot.tree.sync()
182
  print('We have logged in as {0.user}'.format(bot))
183
 
 
29
 
30
  intents = discord.Intents.default()
31
  intents.message_content = True
32
+ bot = commands.Bot(command_prefix='>', intents=intents)
33
+ tree = bot.tree
34
 
35
 
36
  with open("discord.json", "r") as f:
 
165
  print(x)
166
  print(y)
167
  await interaction.response.send_message(f"x: {x}, y: {y}")
168
+ MyClient(bot)
 
169
 
170
 
171
 
 
176
 
177
  @bot.event
178
  async def on_ready():
179
+ await tree.sync()
180
  await bot.tree.sync()
181
  print('We have logged in as {0.user}'.format(bot))
182