This commit is contained in:
2025-05-26 22:35:26 +02:00
parent 1da66274cc
commit 5e9593955a

View File

@ -8,6 +8,7 @@ import discord
from discord.ext import commands from discord.ext import commands
import logging import logging
from datetime import datetime, timedelta from datetime import datetime, timedelta
from math import ceil
HOURS = 24 HOURS = 24
@ -40,7 +41,7 @@ class PollCog(commands.Cog):
for member in interaction.guild.members for member in interaction.guild.members
if not member.bot and member.status != discord.Status.offline if not member.bot and member.status != discord.Status.offline
] ]
required_votes = max(1, len(active_members) // 2) required_votes = max(1, ceil(len(active_members) / 2))
question = f"Should we invite {username} to the server?" question = f"Should we invite {username} to the server?"
duration = timedelta(hours=HOURS) duration = timedelta(hours=HOURS)