Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding multiple options + Custom Emojis #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KnifeAndFawkes
Copy link
Collaborator

This also now deletes the original message.

This also now deletes the original message.
@KnifeAndFawkes KnifeAndFawkes added the enhancement New feature or request label Jun 18, 2019
@KnifeAndFawkes KnifeAndFawkes self-assigned this Jun 18, 2019
Copy link
Owner

@yevgeniusr yevgeniusr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrite some code by comments pls)

i = 2 # To avoid !vote / topic
while i < option_count:
msg+="Option " + str(i-1) + " - " + message_list[i].split("=")[1] + " [ " + message_list[i].split("=")[0] + " ]" + "\n\n"
i += 1
await message.channel.send(msg)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to delete message after this line

await message.add_reaction(emoji_thumbs_down)
await message.pin()
# lets get the original message to find all emojis
async for original_message in message.channel.history(limit=2):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can take a someone else's message by accident

emoji_count = len(message_list2) #Total emojis
j = 2 # To avoid !vote / topic
while j < emoji_count:
emoji_current = message_list2[j].split("=")[0]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to eddit this part to finding a emoji in our message from bot and attaching it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants