Exemplo n.º 1
0
 def check(reaction : Reaction, user):
     if reaction.emoji in emojiList():
         index = emojiList().index(reaction.emoji)
         if index < len(compList):
             msg.content = f"{kwargs['prefix']}removeCompetition {compList[index].clear_name},{compList[index].association_id}"
             client.loop.create_task(cmdHandler(msg))
             return True
Exemplo n.º 2
0
 def check(reaction, user):
     if reaction.emoji in emojiList():
         index = emojiList().index(reaction.emoji)
         if index < len(compList):
             kwargs['msg'].content = f"!removeCompetition {compList[index]}"
             client.loop.create_task(cmdHandler(kwargs['msg']))
             return True
     return False
Exemplo n.º 3
0
 def check(reaction: Reaction, user):
     if reaction.emoji in emojiList():
         try:
             index = emojiList().index(reaction.emoji)
         except ValueError:
             logger.error(f"{reaction.emoji} not in list!")
             return False
         if index < len(compList):
             msg.content = f"{kwargs['prefix']}addCompetition {compList[index]}"
             client.loop.create_task(cmdHandler(msg))
             return True
Exemplo n.º 4
0
 def check(reaction : Reaction, user : User):
     print(reaction.count)
     if reaction.count == 2:
         client.loop.create_task(resetPaging(reaction.message))
     e = str(reaction.emoji)
     print(e)
     print(e == emojiList()[0])
     return False
Exemplo n.º 5
0
 def check(reaction : Reaction, user):
     if reaction.emoji == emojiList()[0]:
         client.loop.create_task(msg.channel.send("Bot is shutting down in 10 seconds"))
         client.loop.create_task(shutdown())
         return True
Exemplo n.º 6
0
 def check(reaction, user):
     if reaction.emoji == emojiList()[0]:
         client.loop.create_task(client.send_message(kwargs['msg'].channel, "Bot is shutting down in 10 seconds"))
         client.loop.create_task(shutdown())
         return True
     return False