Skip to content

Instantly share code, notes, and snippets.

@Ayyko
Created February 12, 2017 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ayyko/1f076f0fbab2df823e4fdf02c6342bb4 to your computer and use it in GitHub Desktop.
Save Ayyko/1f076f0fbab2df823e4fdf02c6342bb4 to your computer and use it in GitHub Desktop.
# 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