{"action":"created","comment":{"url":"https://api.github.com/repos/discord-python/bot/pulls/comments/171739006","pull_request_review_id":100646616,"id":171739006,"diff_hunk":"@@ -0,0 +1,218 @@\n+# coding=utf-8\n+import os\n+\n+from discord import ClientException, Colour, Embed\n+from discord.ext.commands import AutoShardedBot, Context, command\n+\n+from bot.constants import (\n+    ADMIN_ROLE, BOT_AVATAR_URL, DEVOPS_ROLE, GITHUB_URL_BOT, GREEN_CHEVRON, MODERATOR_ROLE, OWNER_ROLE, RED_CHEVRON\n+)\n+from bot.decorators import with_role\n+from bot.utils import paginate\n+\n+\n+class Cogs:\n+    \"\"\"\n+    Cog management commands\n+    \"\"\"\n+\n+    def __init__(self, bot: AutoShardedBot):\n+        self.bot = bot\n+        self.cogs = {}\n+\n+        # Load up the cog names\n+        for filename in os.listdir(\"bot/cogs\"):\n+            if filename.endswith(\".py\") and \"_\" not in filename:\n+                if os.path.isfile(f\"bot/cogs/{filename}\"):\n+                    cog = filename[:-3]\n+\n+                    self.cogs[cog] = f\"bot.cogs.{cog}\"\n+\n+        # Allow reverse lookups by reversing the pairs\n+        self.cogs.update({v: k for k, v in self.cogs.items()})\n+\n+    @command(name=\"cogs.load()\", aliases=[\"cogs.load\", \"load_cog\"])\n+    @with_role(MODERATOR_ROLE, ADMIN_ROLE, OWNER_ROLE, DEVOPS_ROLE)\n+    async def load_command(self, ctx: Context, cog: str):","path":"bot/cogs/cogs.py","position":36,"original_position":36,"commit_id":"7a3adb721ba3c92995c2e2bb7384a7db5e002518","original_commit_id":"094ffb4caf72003c1ecbf27e367d3f4458c06a05","user":{"login":"1mn","id":2098517,"avatar_url":"https://avatars2.githubusercontent.com/u/2098517?v=4","gravatar_id":"","url":"https://api.github.com/users/1mn","html_url":"https://github.com/1mn","followers_url":"https://api.github.com/users/1mn/followers","following_url":"https://api.github.com/users/1mn/following{/other_user}","gists_url":"https://api.github.com/users/1mn/gists{/gist_id}","starred_url":"https://api.github.com/users/1mn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1mn/subscriptions","organizations_url":"https://api.github.com/users/1mn/orgs","repos_url":"https://api.github.com/users/1mn/repos","events_url":"https://api.github.com/users/1mn/events{/privacy}","received_events_url":"https://api.github.com/users/1mn/received_events","type":"User","site_admin":false},"body":"do the methods really have to be called x_command, can't they just all be called x? it's clear that they are commands from the decorator.","created_at":"2018-03-02T00:46:12Z","updated_at":"2018-03-02T00:50:29Z","html_url":"https://github.com/discord-python/bot/pull/19#discussion_r171739006","pull_request_url":"https://api.github.com/repos/discord-python/bot/pulls/19","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/discord-python/bot/pulls/comments/171739006"},"html":{"href":"https://github.com/discord-python/bot/pull/19#discussion_r171739006"},"pull_request":{"href":"https://api.github.com/repos/discord-python/bot/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/discord-python/bot/pulls/19","id":171927906,"html_url":"https://github.com/discord-python/bot/pull/19","diff_url":"https://github.com/discord-python/bot/pull/19.diff","patch_url":"https://github.com/discord-python/bot/pull/19.patch","issue_url":"https://api.github.com/repos/discord-python/bot/issues/19","number":19,"state":"open","locked":false,"title":"Cog management #1404e","user":{"login":"gdude2002","id":204153,"avatar_url":"https://avatars3.githubusercontent.com/u/204153?v=4","gravatar_id":"","url":"https://api.github.com/users/gdude2002","html_url":"https://github.com/gdude2002","followers_url":"https://api.github.com/users/gdude2002/followers","following_url":"https://api.github.com/users/gdude2002/following{/other_user}","gists_url":"https://api.github.com/users/gdude2002/gists{/gist_id}","starred_url":"https://api.github.com/users/gdude2002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdude2002/subscriptions","organizations_url":"https://api.github.com/users/gdude2002/orgs","repos_url":"https://api.github.com/users/gdude2002/repos","events_url":"https://api.github.com/users/gdude2002/events{/privacy}","received_events_url":"https://api.github.com/users/gdude2002/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-28T11:34:39Z","updated_at":"2018-03-02T00:50:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51323a044e314a3d13fca4ff8170c994f2aae9f0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"shadycake","id":28223854,"avatar_url":"https://avatars2.githubusercontent.com/u/28223854?v=4","gravatar_id":"","url":"https://api.github.com/users/shadycake","html_url":"https://github.com/shadycake","followers_url":"https://api.github.com/users/shadycake/followers","following_url":"https://api.github.com/users/shadycake/following{/other_user}","gists_url":"https://api.github.com/users/shadycake/gists{/gist_id}","starred_url":"https://api.github.com/users/shadycake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadycake/subscriptions","organizations_url":"https://api.github.com/users/shadycake/orgs","repos_url":"https://api.github.com/users/shadycake/repos","events_url":"https://api.github.com/users/shadycake/events{/privacy}","received_events_url":"https://api.github.com/users/shadycake/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":825744587,"url":"https://api.github.com/repos/discord-python/bot/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/discord-python/bot/pulls/19/commits","review_comments_url":"https://api.github.com/repos/discord-python/bot/pulls/19/comments","review_comment_url":"https://api.github.com/repos/discord-python/bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/discord-python/bot/issues/19/comments","statuses_url":"https://api.github.com/repos/discord-python/bot/statuses/7a3adb721ba3c92995c2e2bb7384a7db5e002518","head":{"label":"discord-python:cog-management","ref":"cog-management","sha":"7a3adb721ba3c92995c2e2bb7384a7db5e002518","user":{"login":"discord-python","id":36101493,"avatar_url":"https://avatars0.githubusercontent.com/u/36101493?v=4","gravatar_id":"","url":"https://api.github.com/users/discord-python","html_url":"https://github.com/discord-python","followers_url":"https://api.github.com/users/discord-python/followers","following_url":"https://api.github.com/users/discord-python/following{/other_user}","gists_url":"https://api.github.com/users/discord-python/gists{/gist_id}","starred_url":"https://api.github.com/users/discord-python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/discord-python/subscriptions","organizations_url":"https://api.github.com/users/discord-python/orgs","repos_url":"https://api.github.com/users/discord-python/repos","events_url":"https://api.github.com/users/discord-python/events{/privacy}","received_events_url":"https://api.github.com/users/discord-python/received_events","type":"Organization","site_admin":false},"repo":{"id":120088519,"name":"bot","full_name":"discord-python/bot","owner":{"login":"discord-python","id":36101493,"avatar_url":"https://avatars0.githubusercontent.com/u/36101493?v=4","gravatar_id":"","url":"https://api.github.com/users/discord-python","html_url":"https://github.com/discord-python","followers_url":"https://api.github.com/users/discord-python/followers","following_url":"https://api.github.com/users/discord-python/following{/other_user}","gists_url":"https://api.github.com/users/discord-python/gists{/gist_id}","starred_url":"https://api.github.com/users/discord-python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/discord-python/subscriptions","organizations_url":"https://api.github.com/users/discord-python/orgs","repos_url":"https://api.github.com/users/discord-python/repos","events_url":"https://api.github.com/users/discord-python/events{/privacy}","received_events_url":"https://api.github.com/users/discord-python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/discord-python/bot","description":"Source code for our Discord bot","fork":false,"url":"https://api.github.com/repos/discord-python/bot","forks_url":"https://api.github.com/repos/discord-python/bot/forks","keys_url":"https://api.github.com/repos/discord-python/bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/discord-python/bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/discord-python/bot/teams","hooks_url":"https://api.github.com/repos/discord-python/bot/hooks","issue_events_url":"https://api.github.com/repos/discord-python/bot/issues/events{/number}","events_url":"https://api.github.com/repos/discord-python/bot/events","assignees_url":"https://api.github.com/repos/discord-python/bot/assignees{/user}","branches_url":"https://api.github.com/repos/discord-python/bot/branches{/branch}","tags_url":"https://api.github.com/repos/discord-python/bot/tags","blobs_url":"https://api.github.com/repos/discord-python/bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/discord-python/bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/discord-python/bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/discord-python/bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/discord-python/bot/statuses/{sha}","languages_url":"https://api.github.com/repos/discord-python/bot/languages","stargazers_url":"https://api.github.com/repos/discord-python/bot/stargazers","contributors_url":"https://api.github.com/repos/discord-python/bot/contributors","subscribers_url":"https://api.github.com/repos/discord-python/bot/subscribers","subscription_url":"https://api.github.com/repos/discord-python/bot/subscription","commits_url":"https://api.github.com/repos/discord-python/bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/discord-python/bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/discord-python/bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/discord-python/bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/discord-python/bot/contents/{+path}","compare_url":"https://api.github.com/repos/discord-python/bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/discord-python/bot/merges","archive_url":"https://api.github.com/repos/discord-python/bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/discord-python/bot/downloads","issues_url":"https://api.github.com/repos/discord-python/bot/issues{/number}","pulls_url":"https://api.github.com/repos/discord-python/bot/pulls{/number}","milestones_url":"https://api.github.com/repos/discord-python/bot/milestones{/number}","notifications_url":"https://api.github.com/repos/discord-python/bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/discord-python/bot/labels{/name}","releases_url":"https://api.github.com/repos/discord-python/bot/releases{/id}","deployments_url":"https://api.github.com/repos/discord-python/bot/deployments","created_at":"2018-02-03T12:20:25Z","updated_at":"2018-02-25T21:28:38Z","pushed_at":"2018-03-02T00:41:22Z","git_url":"git://github.com/discord-python/bot.git","ssh_url":"git@github.com:discord-python/bot.git","clone_url":"https://github.com/discord-python/bot.git","svn_url":"https://github.com/discord-python/bot","homepage":"","size":100,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":7,"watchers":7,"default_branch":"master"}},"base":{"label":"discord-python:master","ref":"master","sha":"f1ced1804b0355e66ae4a2dd1a5214bd939bb383","user":{"login":"discord-python","id":36101493,"avatar_url":"https://avatars0.githubusercontent.com/u/36101493?v=4","gravatar_id":"","url":"https://api.github.com/users/discord-python","html_url":"https://github.com/discord-python","followers_url":"https://api.github.com/users/discord-python/followers","following_url":"https://api.github.com/users/discord-python/following{/other_user}","gists_url":"https://api.github.com/users/discord-python/gists{/gist_id}","starred_url":"https://api.github.com/users/discord-python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/discord-python/subscriptions","organizations_url":"https://api.github.com/users/discord-python/orgs","repos_url":"https://api.github.com/users/discord-python/repos","events_url":"https://api.github.com/users/discord-python/events{/privacy}","received_events_url":"https://api.github.com/users/discord-python/received_events","type":"Organization","site_admin":false},"repo":{"id":120088519,"name":"bot","full_name":"discord-python/bot","owner":{"login":"discord-python","id":36101493,"avatar_url":"https://avatars0.githubusercontent.com/u/36101493?v=4","gravatar_id":"","url":"https://api.github.com/users/discord-python","html_url":"https://github.com/discord-python","followers_url":"https://api.github.com/users/discord-python/followers","following_url":"https://api.github.com/users/discord-python/following{/other_user}","gists_url":"https://api.github.com/users/discord-python/gists{/gist_id}","starred_url":"https://api.github.com/users/discord-python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/discord-python/subscriptions","organizations_url":"https://api.github.com/users/discord-python/orgs","repos_url":"https://api.github.com/users/discord-python/repos","events_url":"https://api.github.com/users/discord-python/events{/privacy}","received_events_url":"https://api.github.com/users/discord-python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/discord-python/bot","description":"Source code for our Discord bot","fork":false,"url":"https://api.github.com/repos/discord-python/bot","forks_url":"https://api.github.com/repos/discord-python/bot/forks","keys_url":"https://api.github.com/repos/discord-python/bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/discord-python/bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/discord-python/bot/teams","hooks_url":"https://api.github.com/repos/discord-python/bot/hooks","issue_events_url":"https://api.github.com/repos/discord-python/bot/issues/events{/number}","events_url":"https://api.github.com/repos/discord-python/bot/events","assignees_url":"https://api.github.com/repos/discord-python/bot/assignees{/user}","branches_url":"https://api.github.com/repos/discord-python/bot/branches{/branch}","tags_url":"https://api.github.com/repos/discord-python/bot/tags","blobs_url":"https://api.github.com/repos/discord-python/bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/discord-python/bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/discord-python/bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/discord-python/bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/discord-python/bot/statuses/{sha}","languages_url":"https://api.github.com/repos/discord-python/bot/languages","stargazers_url":"https://api.github.com/repos/discord-python/bot/stargazers","contributors_url":"https://api.github.com/repos/discord-python/bot/contributors","subscribers_url":"https://api.github.com/repos/discord-python/bot/subscribers","subscription_url":"https://api.github.com/repos/discord-python/bot/subscription","commits_url":"https://api.github.com/repos/discord-python/bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/discord-python/bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/discord-python/bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/discord-python/bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/discord-python/bot/contents/{+path}","compare_url":"https://api.github.com/repos/discord-python/bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/discord-python/bot/merges","archive_url":"https://api.github.com/repos/discord-python/bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/discord-python/bot/downloads","issues_url":"https://api.github.com/repos/discord-python/bot/issues{/number}","pulls_url":"https://api.github.com/repos/discord-python/bot/pulls{/number}","milestones_url":"https://api.github.com/repos/discord-python/bot/milestones{/number}","notifications_url":"https://api.github.com/repos/discord-python/bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/discord-python/bot/labels{/name}","releases_url":"https://api.github.com/repos/discord-python/bot/releases{/id}","deployments_url":"https://api.github.com/repos/discord-python/bot/deployments","created_at":"2018-02-03T12:20:25Z","updated_at":"2018-02-25T21:28:38Z","pushed_at":"2018-03-02T00:41:22Z","git_url":"git://github.com/discord-python/bot.git","ssh_url":"git@github.com:discord-python/bot.git","clone_url":"https://github.com/discord-python/bot.git","svn_url":"https://github.com/discord-python/bot","homepage":"","size":100,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":7,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/discord-python/bot/pulls/19"},"html":{"href":"https://github.com/discord-python/bot/pull/19"},"issue":{"href":"https://api.github.com/repos/discord-python/bot/issues/19"},"comments":{"href":"https://api.github.com/repos/discord-python/bot/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/discord-python/bot/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/discord-python/bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/discord-python/bot/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/discord-python/bot/statuses/7a3adb721ba3c92995c2e2bb7384a7db5e002518"}},"author_association":"OWNER"}}
{"actor":{"display_login":"1mn"}}