title: trying to list the most "voted on" messages with a specific reaction emoji on them
body: <p>Trying to do a thing where you enter a command and get a list of the top 5 messages with a reaction emoji called :goldmedal: . when entered into the bot, everything is fine, but when executing the command it starts a infinite loop of responses to every message it can find. and doesn't show the "goldmedal" value, but rather all the reactions on that specific message. <a href="https://cdn.discordapp.com/attachments/511938736594878478/512733361819746314/unknown.png" rel="nofollow noreferrer">https://cdn.discordapp.com/attachments/511938736594878478/512733361819746314/unknown.png</a></p>
  
  <pre><code>import discord
  from discord import Game
  from discord.ext.commands import Bot
  from discord import Channel
  from discord.utils import get
  from discord.ext import commands
  
  bot = Bot(command_prefix='!')
  
  
      def num_reactions(message):
          return sum(react_count for react in message.reactions)
  
      @bot.command(pass_context=True)
      async def most_reacted(ctx, channel: Channel):
          most_reactions = most_reactions_message = None
          goldmedal_emoji = get(ctx.message.server.emojis, name="goldmedal_emoji")
          async for message in bot.logs_from(channel):
              num_reactions_message = ([goldmedal_emoji])
              num_reactions_message = num_reactions(message)
              if not most_reactions or num_reactions_message &gt; most_reactions:
                  most_reactions = num_reactions_message
                  most_reactions_message = message
                  await bot.say(f"{most_reactions_message.content} has the most Gold Medals with {most_reactions}")
  </code></pre>