diff --git a/bottas.py b/bottas.py index 9698a13..11c03d1 100644 --- a/bottas.py +++ b/bottas.py @@ -53,7 +53,10 @@ async def index(self, ctx, index: int = 0): while not quote: # Randomly generates a valid quote index = random.randint(1, count) quote = self.get_quote(index) - content += f"Quote #{index}:\n> {quote[0]} - {quote[1]}\n Uploaded by {self.bot.get_user(quote[2])}" + user = self.bot.get_user(quote[2]) + if not user: + user = await self.bot.fetch_user(quote[2]) + content += f"Quote #{index}:\n> {quote[0]} - {quote[1]}\n Uploaded by {user}" await ctx.send(content) # Sends the quote @quote.command(aliases=['q'])