diff --git a/Chatbot.py b/Chatbot.py index 0c6d49e..3138bf5 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -126,6 +126,8 @@ async def on_message(message): #checks for a message if "salt " == (message.content.lower())[:5]: # checks if the input matches "salt " communityName = (message.content)[5:] # saves the rest of the input as communityName + await message.add_reaction("🆗") # devops work item 35 + if communityName.upper() in polls.values(): # if there is a poll active already pollID = list(polls.keys())[list(polls.values()).index(communityName.upper())] # get the ID of the poll await message.channel.send(f'The community: {communityName} already has a poll active. Poll ID:{pollID}.') # message to discord