Skip to content

Commit

Permalink
feat: sync to only current guild
Browse files Browse the repository at this point in the history
  • Loading branch information
SkellyBG committed Feb 20, 2024
1 parent ead3973 commit d1d9d6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ async def reload(ctx: commands.context.Context, extension):
@bot.command()
async def sync(ctx: commands.context.Context):
try:
synced = await bot.tree.sync()
bot.tree.copy_global_to(guild=ctx.guild)
synced = await bot.tree.sync(guild=ctx.guild)
await ctx.send(f"Synced {len(synced)} commands.")
except Exception as e:
print(e)
Expand Down

0 comments on commit d1d9d6e

Please sign in to comment.