diff options
| author | 2020-10-01 10:08:12 +0530 | |
|---|---|---|
| committer | 2020-10-01 10:08:12 +0530 | |
| commit | 7d593edd30d1d14cb367c5896333fa343fe3e6ea (patch) | |
| tree | cb89b18e4d047e3729c0e8c8a114f4e15f1293db /bot | |
| parent | fixed checks failing by running Installing dependencies from Pipfile.lock (28... (diff) | |
fixed issues showing up in Check for merge conflicts................................................[42mPassed[m
Check Toml...............................................................[42mPassed[m
Check Yaml...............................................................[42mPassed[m
Fix End of Files.........................................................[42mPassed[m
Mixed line ending........................................................[42mPassed[m
Trim Trailing Whitespace.................................................[42mPassed[m
check blanket noqa.......................................................[42mPassed[m
Flake8...................................................................[42mPassed[m
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/exts/evergreen/githubinfo.py | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/bot/exts/evergreen/githubinfo.py b/bot/exts/evergreen/githubinfo.py index e2541a23..46f6d167 100644 --- a/bot/exts/evergreen/githubinfo.py +++ b/bot/exts/evergreen/githubinfo.py @@ -1,7 +1,7 @@  import logging -import aiohttp  from datetime import datetime +import aiohttp  import discord  from discord.ext import commands  from discord.ext.commands.cooldowns import BucketType @@ -10,13 +10,13 @@ log = logging.getLogger(__name__)  class GithubInfo(commands.Cog): +    """Fetches GitHub."""      def __init__(self, bot: commands.Bot):          self.bot = bot      async def fetch_data(self, url: str) -> dict: -        """Retrieve data as a dictionary""" - +        """Retrieve data as a dictionary."""          async with aiohttp.ClientSession() as cs:              async with cs.get(url) as r:                  return await r.json() @@ -24,13 +24,13 @@ class GithubInfo(commands.Cog):      @commands.command(name='github', aliases=['gh'])      @commands.cooldown(1, 5, BucketType.user)      async def get_github_info(self, ctx: commands.Context, username: str = 'python-discord') -> None: -        """Fetches a user's GitHub information +        """ +        Fetches a user's GitHub information. -        User defaults to python-discord +        User defaults to python-discord.          Usage: .gh [username]          """ -          # fetch user data          user_data = await self.fetch_data(f"https://api.github.com/users/{username}") @@ -84,5 +84,5 @@ class GithubInfo(commands.Cog):  def setup(bot: commands.Bot) -> None: -    """Adding the cog to the bot""" +    """Adding the cog to the bot."""      bot.add_cog(GithubInfo(bot)) | 
