bot: fix channel creation
crispy-caesus crispy@crispy-caesus.eu
Tue, 18 Nov 2025 10:30:47 +0100
M
bot.py
→
bot.py
@@ -99,7 +99,7 @@ db = await init_db(ctx)
await db.initial_setup() ids = await db.get_discord_ids() - print(ids) + #print(ids) checks = [] for id in ids:@@ -254,7 +254,7 @@ if ctx.author.get_role(boosterRoleId) is None:
await ctx.respond(":x: Du bist kein Booster") return - if await db.select_role_id_by_owner(ctx.author.id) is None: + if await db.select_role_id_by_owner(ctx.author.id) is not None: await ctx.respond("❌ Error! Du hast bereits einen Club") return@@ -345,7 +345,7 @@ def check(m):
return m.author == user and m.channel == ctx cycle = 1 - while cycle < 3: + while cycle <= 3: try: response = await bot.wait_for('message', check=check, timeout=30.0)@@ -358,14 +358,14 @@ int(response.content)
except ValueError: await ctx.send(":x: Konnte nicht in ganze Zahl umwandeln") continue - if int(response.content) > len(db_response) and int(response.content) <= 0: + if int(response.content) > len(db_response) or int(response.content) <= 0: await ctx.send(":x: Nicht zulässige Zahl") else: return response cycle += 1 - ctx.send( + await ctx.send( ":x: Zu viele Versuche, trete dem Channel erneut bei, um noch einmal auszuwählen") return None