diff --git a/bot.py b/bot.py index 36a046e..c7003a0 100644 --- a/bot.py +++ b/bot.py @@ -100,7 +100,7 @@ class Confirm(discord.ui.View): self.stop() @bot.slash_command(guild_ids=[261575556708040705]) -@permissions.has_role(member_role) +@commands.has_role(member_role) async def roll(ctx, dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"), ): @@ -133,7 +133,7 @@ async def roll(ctx, await ctx.response.send_message(embed=em) @bot.slash_command(guild_ids=[261575556708040705]) -@permissions.has_role(gm_role) +@commands.has_role(gm_role) async def gmroll(ctx, dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"), ): @@ -181,7 +181,7 @@ class MyModal(Modal): @bot.message_command(name="Emoji Text", guild_ids=[261575556708040705]) -@permissions.has_role(member_role) +@commands.has_role(member_role) async def emoji_text(ctx, message: discord.Message): modal = MyModal() modal.title = "Emoji Bot" diff --git a/clear_commands.py b/clear_commands.py index 8fd85e0..5bb7e59 100644 --- a/clear_commands.py +++ b/clear_commands.py @@ -4,6 +4,7 @@ import time import datetime import random import os +import sys from os import system from os import environ from discord.ext import commands @@ -22,7 +23,7 @@ bot = commands.Bot(intents=intents, command_prefix=prefix) @bot.event async def on_connect(): print("Bot ready on Version %s..." % discord.__version__) - await bot.sync_commands(commands=[], check_guilds=[261575556708040705]) - print("Press Ctl+c to exit now") + await bot.sync_commands(commands=[], guild_ids=[261575556708040705]) + os._exit(0) bot.run(token) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 23eaf87..027a78e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -py-cord==2.0.0b7 \ No newline at end of file +py-cord==2.0.0rc1