This commit is contained in:
@@ -8,6 +8,7 @@ import nextcord
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from classes.nominate_views import NominateView
|
||||
from config import DakinyConfig
|
||||
from database_setup.sql_data_classes import ElectionInformation, engine
|
||||
from utils import get_datetime
|
||||
@@ -166,8 +167,12 @@ class ElectionCycle:
|
||||
# election start message is returned as an array of string because it is too long. send each string
|
||||
# individually.
|
||||
messages = self.build_election_announcement()
|
||||
for message in messages:
|
||||
await election_channel.send(message)
|
||||
for index, message in enumerate(messages):
|
||||
# if last item, add the nominate button
|
||||
if index + 1 == len(messages):
|
||||
await election_channel.send(message, view=NominateView())
|
||||
else:
|
||||
await election_channel.send(message)
|
||||
|
||||
async def voting_start_action(self) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user