diff options
| author | 2020-10-31 07:28:56 +0000 | |
|---|---|---|
| committer | 2020-10-31 07:28:56 +0000 | |
| commit | 147e37a53073b6e4291e1d386f8d2a6b0114f535 (patch) | |
| tree | b552c86c1b6d5a3aa2977b762dee018365b246c6 /bot | |
| parent | Fix capitalization and grammar (diff) | |
Put GitHub user-not-found message in embed
With random `NEGATIVE_REPLIES` + color=red
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/exts/halloween/hacktoberstats.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py index 0f6b9924..bb5a6325 100644 --- a/bot/exts/halloween/hacktoberstats.py +++ b/bot/exts/halloween/hacktoberstats.py @@ -1,5 +1,6 @@ import json import logging +import random import re from collections import Counter from datetime import datetime, timedelta @@ -10,7 +11,7 @@ import aiohttp import discord from discord.ext import commands -from bot.constants import Channels, Month, Tokens, WHITELISTED_CHANNELS +from bot.constants import Channels, Month, NEGATIVE_REPLIES, Tokens, WHITELISTED_CHANNELS from bot.utils.decorators import in_month, override_in_channel from bot.utils.persist import make_persistent @@ -180,7 +181,9 @@ class HacktoberStats(commands.Cog): prs = await self.get_october_prs(github_username) if prs is None: # Will be None if the user was not found - await ctx.send("GitHub user not found: " + github_username) + await ctx.send(embed=discord.Embed(title=random.choice(NEGATIVE_REPLIES), + description=f"GitHub user `{github_username}` was not found.", + colour=discord.Colour.red())) return if prs: |