Skip to content

Commit ca3ed84

Browse files
committed
sync_commands_globally in config
1 parent fd9dffa commit ca3ed84

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ async def on_ready() -> None:
101101
print(f"Running on: {platform.system()} {platform.release()} ({os.name})")
102102
print("-------------------")
103103
status_task.start()
104+
if config["sync_commands_globally"]:
105+
print("Syncing commands globally...")
106+
await bot.tree.sync()
104107

105108

106109
@tasks.loop(minutes=1.0)

config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"token": "YOUR_BOT_TOKEN_HERE",
44
"permissions": "YOUR_BOT_PERMISSIONS_HERE",
55
"application_id": "YOUR_APPLICATION_ID_HERE",
6+
"sync_commands_globally": false,
67
"owners": [
78
123456789,
89
987654321

0 commit comments

Comments
 (0)