modified: app.py
This commit is contained in:
9
app.py
9
app.py
@@ -32,6 +32,13 @@ async def on_ready():
|
||||
activity=discord.Game(name="Hearts of Iron IV"),
|
||||
status=discord.Status.online
|
||||
)
|
||||
|
||||
# Sync hybrid commands on startup
|
||||
try:
|
||||
synced = await bot.tree.sync()
|
||||
print(f'Synced {len(synced)} hybrid commands')
|
||||
except Exception as e:
|
||||
print(f'Failed to sync commands: {e}')
|
||||
|
||||
@bot.event
|
||||
async def on_guild_join(guild):
|
||||
@@ -53,7 +60,7 @@ def is_owner():
|
||||
return commands.check(predicate)
|
||||
|
||||
# Owner Commands
|
||||
@bot.command(name='reload')
|
||||
@bot.hybrid_command(name='reload', description='Reloads the bot and syncs slash commands (Owner only)')
|
||||
@is_owner()
|
||||
async def reload_bot(ctx):
|
||||
"""Reloads the bot and syncs slash commands (Owner only)"""
|
||||
|
||||
Reference in New Issue
Block a user