joytou commited on
Commit
6874acf
·
1 Parent(s): 0a11892

try to add client tree sync

Browse files
Files changed (1) hide show
  1. discord_bot.py +1 -0
discord_bot.py CHANGED
@@ -152,6 +152,7 @@ for command in json_data["command"]:
152
  class Test:
153
  def __init__(self, client):
154
  client.tree.add_command(app_commands.Command(name="test", callback=self.test, description="test"))
 
155
  def test(self, inter, x: str, y: int):
156
  print(self)
157
  print(inter)
 
152
  class Test:
153
  def __init__(self, client):
154
  client.tree.add_command(app_commands.Command(name="test", callback=self.test, description="test"))
155
+ await client.tree.sync()
156
  def test(self, inter, x: str, y: int):
157
  print(self)
158
  print(inter)