joytou commited on
Commit
15e0800
·
1 Parent(s): 4d83248
Files changed (1) hide show
  1. discord_bot.py +4 -4
discord_bot.py CHANGED
@@ -28,8 +28,8 @@ check_functions = {
28
 
29
  intents = discord.Intents.default()
30
  intents.message_content = True
31
- #bot = commands.Bot(command_prefix='>', intents=intents)
32
- #tree = bot.tree
33
 
34
 
35
  with open("discord.json", "r") as f:
@@ -132,8 +132,8 @@ for command in json_data["command"]:
132
  tree_command = app_commands.Command(
133
  name=command["name"],
134
  description=command["description"],
135
- callback=dynamic_command,
136
- parameters=params
137
  )
138
 
139
  # 将命令添加到 bot 的 command tree
 
28
 
29
  intents = discord.Intents.default()
30
  intents.message_content = True
31
+ bot = commands.Bot(command_prefix='>', intents=intents)
32
+ tree = bot.tree
33
 
34
 
35
  with open("discord.json", "r") as f:
 
132
  tree_command = app_commands.Command(
133
  name=command["name"],
134
  description=command["description"],
135
+ callback=dynamic_command
136
+ #parameters=params
137
  )
138
 
139
  # 将命令添加到 bot 的 command tree