Created
February 12, 2017 06:52
-
-
Save Ayyko/1f076f0fbab2df823e4fdf02c6342bb4 to your computer and use it in GitHub Desktop.
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 is everything that happens after message is made | |
self.current_maker = await self.bot.say(embed=embed) | |
self.making = True | |
await self.reset_reactions() | |
# and this is reset_reactions | |
async def reset_reactions(self): | |
channel = self.current_maker.channel | |
server = self.current_maker.server | |
can_clear = channel.permissions_for(server.me).manage_messages | |
if can_clear: | |
await self.bot.clear_reactions(self.current_maker) | |
else: | |
for reaction in self.current_maker.reactions: | |
await self.bot.remove_reaction(self.current_maker, reaction.emoji, self.user) | |
for (emoji, func) in self.reaction_emojis: | |
try: | |
await self.bot.add_reaction(self.current_maker, emoji) | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment