Skip to content
Permalink
23d1e50b89
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (18 sloc) 713 Bytes
# a file which is incredibly salty
# read through at your own risk
polls = {}
async def createSaltPoll(communityName,message):
poll = await message.channel.send(f'vote here: for {communityName}')
polls[poll.id] = communityName
tickEmoji = "\u2705"
crossEmoji = "\u274C"
await poll.add_reaction(tickEmoji)
await poll.add_reaction(crossEmoji)
async def getSaltiness(communityName,message):
pollID = list(polls.keys())[list(polls.values()).index(communityName)]
pollMessage = await message.channel.fetch_message(pollID)
pollReactions = pollMessage.reactions
dataFormat = []
dataFormat.append(pollID) # 0
dataFormat.append(pollReactions) # 1
return dataFormat