Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added saltiness stuff in main code, will work on it later to make it …
…work fully. Doesn't interfere with other code (yet) and I can add more print statements to debug later
- Loading branch information
Showing
2 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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 |