Support 50 Recruits

This commit is contained in:
jmueller
2023-12-11 18:08:52 +01:00
parent ce88baceeb
commit 3fa66633be

View File

@@ -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",