From 3fa66633be3e33a0bf2aa49b902f502097b07b1f Mon Sep 17 00:00:00 2001 From: jmueller Date: Mon, 11 Dec 2023 18:08:52 +0100 Subject: [PATCH] Support 50 Recruits --- main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 3df40e1..da43e2b 100644 --- a/main.py +++ b/main.py @@ -63,7 +63,7 @@ settings = bot.create_group("set", "Einstellungen") def get_count_recruits(real = 0): cur.execute("SELECT count(*) FROM recruits WHERE recruit=1") count = cur.fetchone()[0] - if real is 0: + if real == 0: if count > 25: count = count / 2 return int(count) @@ -182,6 +182,8 @@ class Yes_select_50(discord.ui.View): max_values=get_count_recruits(), options=build_option_list(1) ) + async def select_callback(self, select, interaction): # the function called when the user is done selecting options + await process_yes_vote(select, interaction) @discord.ui.select( custom_id="yes50_2", @@ -190,7 +192,6 @@ class Yes_select_50(discord.ui.View): max_values=get_count_recruits(), options=build_option_list(2) ) - async def select_callback(self, select, interaction): # the function called when the user is done selecting options await process_yes_vote(select, interaction) @@ -361,6 +362,8 @@ class No_select50(discord.ui.View): max_values=1, options=build_option_list() ) + async def select_callback(self, select, interaction): # the function called when the user is done selecting options + await process_no_vote(interaction, select) @discord.ui.select( custom_id="no50_2", placeholder="Rekruten wählen...", @@ -368,11 +371,11 @@ class No_select50(discord.ui.View): max_values=1, options=build_option_list(2) ) - async def select_callback(self, select, interaction): # the function called when the user is done selecting options await process_no_vote(interaction, select) + def create_no_embed(): embed = discord.Embed( title="Rekrutenbesichtigung: Nein-Stimme",