Skip to content

Commit

Permalink
add force sync
Browse files Browse the repository at this point in the history
  • Loading branch information
0xEthamin committed Jun 13, 2024
1 parent 57ee59a commit d92362e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/GarageBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ async def get_log(ctx):
except FileNotFoundError:
await ctx.send("Aucune log", ephemeral=True)

@bot.command(name="force sync")
async def force_sync(ctx):
admin = discord.utils.get(ctx.guild.roles, id=int(os.getenv("DISCORD_ROLE_ADMIN_ID")))
if not (admin in ctx.author.roles):
await ctx.send("Vous n'avez pas la permission de faire ça. Vous devez être Admin.", ephemeral=True)
return
await bot.tree.sync()
await ctx.send("Done !", ephemeral=True)

if __name__ == "__main__":
bot.run(os.getenv("DISCORD_GARAGEBOT_TOKEN"))

0 comments on commit d92362e

Please sign in to comment.