From 0b2dfca4ddd7b9c4f9cefcca7c14dff2f9bd4aaa Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Tue, 1 Feb 2022 11:34:51 +0100 Subject: [PATCH 1/5] add empty bot to clear commands. --- clear_commands.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 clear_commands.py diff --git a/clear_commands.py b/clear_commands.py new file mode 100644 index 0000000..4b0d2d2 --- /dev/null +++ b/clear_commands.py @@ -0,0 +1,22 @@ +import discord +import os +from os import system +from os import environ +from discord.ext import commands + +intents = discord.Intents( + guilds=True, + members=True, + messages=True, +) + +token = os.environ['TOKEN'] +prefix = os.environ['PREFIX'] +bot = commands.Bot(intents=intents, command_prefix=prefix) +client = discord.Client() + +@bot.event +async def on_ready(): + print("Bot ready on Version %s..." % discord.__version__) + +bot.run(token) \ No newline at end of file From f0c91d8678b11c24ab20d53d4e6ad324a708aa08 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Tue, 1 Feb 2022 16:25:31 +0100 Subject: [PATCH 2/5] fix error... again --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 9b5500c..452f465 100644 --- a/bot.py +++ b/bot.py @@ -231,8 +231,8 @@ async def vote(ctx, *, arg): async def say(ctx, *, arg): await ctx.message.delete() em = discord.Embed(description=arg, colour=0x00E0FF) - await message.channel.send(embed=em) - await message.delete() + await ctx.message.channel.send(embed=em) + await ctx.message.delete() @bot.command(help="Starte ne Runde PnP", usage="@Rolle") @is_gm() From f16d9d818ae0f507dda8a9e6553131bf1ddff70b Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Tue, 1 Feb 2022 16:26:46 +0100 Subject: [PATCH 3/5] fix error --- bot.py | 1 - 1 file changed, 1 deletion(-) diff --git a/bot.py b/bot.py index 452f465..30013e1 100644 --- a/bot.py +++ b/bot.py @@ -232,7 +232,6 @@ async def say(ctx, *, arg): await ctx.message.delete() em = discord.Embed(description=arg, colour=0x00E0FF) await ctx.message.channel.send(embed=em) - await ctx.message.delete() @bot.command(help="Starte ne Runde PnP", usage="@Rolle") @is_gm() From 2bdd7abc054d5272f07fd64cbcac98a12afb341a Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Tue, 1 Feb 2022 19:21:28 +0100 Subject: [PATCH 4/5] create threads on votes and surveys --- bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot.py b/bot.py index 30013e1..a35cbc2 100644 --- a/bot.py +++ b/bot.py @@ -195,6 +195,7 @@ async def survey(ctx, *, arg): if a < z and a != 0: await ask_msg.add_reaction(x) a = a + 1 + await ask_msg.create_thread(name="Diskussion") @bot.command(help="Umfrage bearbeiten", usage="ID | | | ...", hidden=True) @is_member() @@ -225,6 +226,7 @@ async def vote(ctx, *, arg): ask_msg = await ctx.send(content="||@here||",embed=em) for x in ["✅", "❔", "❌"]: await ask_msg.add_reaction(x) + await ask_msg.create_thread(name="Diskussion") @bot.command(help="den Bot etwas sagen lassen", usage="") @is_admin() From f880b7246b76bacc2c6d4e8b8fede58cf9114cd1 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Fri, 4 Feb 2022 11:14:06 +0100 Subject: [PATCH 5/5] bump py-cord version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 64ab083..70dba3b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -py-cord==2.0.0b1 \ No newline at end of file +py-cord==2.0.0b3 \ No newline at end of file