{"action":"created","comment":{"url":"https://api.github.com/repos/SFUAnime/Ren/pulls/comments/234426325","pull_request_review_id":176072846,"id":234426325,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQyNjMyNQ==","diff_hunk":"@@ -64,24 +64,29 @@ def __init__(self, bot):\n             await self.bot.say(\"You have filtered words in your spoiler!  Please \"\r\n                                \"check it and try again!\")\r\n             return\r\n-        store = {}\r\n-        store[KEY_MESSAGE] = msg\r\n-        store[KEY_AUTHOR_ID] = ctx.message.author.id\r\n-        store[KEY_AUTHOR_NAME] = \"{0.name}#{0.discriminator}\".format(ctx.message.author)\r\n-        store[KEY_TIMESTAMP] = ctx.message.timestamp.strftime(\"%s\")\r\n-        await self.bot.delete_message(ctx.message)\r\n-        newMsg = await self.bot.say(\":warning: {} created a spoiler!  React to see \"\r\n-                                    \"the message!\".format(ctx.message.author.mention))\r\n-        if not self.messages:\r\n-            self.messages = {}\r\n-        self.messages[newMsg.id] = store\r\n-        LOGGER.info(\"%s#%s (%s) added a spoiler: %s\",\r\n-                    ctx.message.author.name,\r\n-                    ctx.message.author.discriminator,\r\n-                    ctx.message.author.id,\r\n-                    msg)\r\n-        await self.bot.add_reaction(newMsg, \"\\N{INFORMATION SOURCE}\")\r\n-        await self.settings.put(\"messages\", self.messages)\r\n+        \r\n+        try:\r\n+            store = {}\r\n+            store[KEY_MESSAGE] = msg\r\n+            store[KEY_AUTHOR_ID] = ctx.message.author.id\r\n+            store[KEY_AUTHOR_NAME] = \"{0.name}#{0.discriminator}\".format(ctx.message.author)\r\n+            store[KEY_TIMESTAMP] = ctx.message.timestamp.strftime(\"%s\")\r\n+            await self.bot.delete_message(ctx.message)\r\n+            newMsg = await self.bot.say(\":warning: {} created a spoiler!  React to see \"\r\n+                                        \"the message!\".format(ctx.message.author.mention))\r\n+            if not self.messages:\r\n+                self.messages = {}\r\n+            self.messages[newMsg.id] = store\r\n+            LOGGER.info(\"%s#%s (%s) added a spoiler: %s\",\r\n+                        ctx.message.author.name,\r\n+                        ctx.message.author.discriminator,\r\n+                        ctx.message.author.id,\r\n+                        msg)\r\n+            await self.bot.add_reaction(newMsg, \"\\N{INFORMATION SOURCE}\")\r","path":"cogs/spoilers.py","position":40,"original_position":40,"commit_id":"d8770143a4b39251c48360677d95140fc06d2425","original_commit_id":"d8770143a4b39251c48360677d95140fc06d2425","user":{"login":"Injabie3","id":6710854,"node_id":"MDQ6VXNlcjY3MTA4NTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6710854?v=4","gravatar_id":"","url":"https://api.github.com/users/Injabie3","html_url":"https://github.com/Injabie3","followers_url":"https://api.github.com/users/Injabie3/followers","following_url":"https://api.github.com/users/Injabie3/following{/other_user}","gists_url":"https://api.github.com/users/Injabie3/gists{/gist_id}","starred_url":"https://api.github.com/users/Injabie3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Injabie3/subscriptions","organizations_url":"https://api.github.com/users/Injabie3/orgs","repos_url":"https://api.github.com/users/Injabie3/repos","events_url":"https://api.github.com/users/Injabie3/events{/privacy}","received_events_url":"https://api.github.com/users/Injabie3/received_events","type":"User","site_admin":false},"body":"I like this idea, let's move this above the the logger info line, since we don't technically create a new spoiler when the exception is thrown.","created_at":"2018-11-18T01:20:19Z","updated_at":"2018-11-18T01:20:47Z","html_url":"https://github.com/SFUAnime/Ren/pull/140#discussion_r234426325","pull_request_url":"https://api.github.com/repos/SFUAnime/Ren/pulls/140","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/SFUAnime/Ren/pulls/comments/234426325"},"html":{"href":"https://github.com/SFUAnime/Ren/pull/140#discussion_r234426325"},"pull_request":{"href":"https://api.github.com/repos/SFUAnime/Ren/pulls/140"}},"in_reply_to_id":234426239},"pull_request":{"url":"https://api.github.com/repos/SFUAnime/Ren/pulls/140","id":231761718,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzYxNzE4","html_url":"https://github.com/SFUAnime/Ren/pull/140","diff_url":"https://github.com/SFUAnime/Ren/pull/140.diff","patch_url":"https://github.com/SFUAnime/Ren/pull/140.patch","issue_url":"https://api.github.com/repos/SFUAnime/Ren/issues/140","number":140,"state":"open","locked":false,"title":"[Spoilers] Check for react permissions","user":{"login":"Tetimaru","id":12128063,"node_id":"MDQ6VXNlcjEyMTI4MDYz","avatar_url":"https://avatars2.githubusercontent.com/u/12128063?v=4","gravatar_id":"","url":"https://api.github.com/users/Tetimaru","html_url":"https://github.com/Tetimaru","followers_url":"https://api.github.com/users/Tetimaru/followers","following_url":"https://api.github.com/users/Tetimaru/following{/other_user}","gists_url":"https://api.github.com/users/Tetimaru/gists{/gist_id}","starred_url":"https://api.github.com/users/Tetimaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tetimaru/subscriptions","organizations_url":"https://api.github.com/users/Tetimaru/orgs","repos_url":"https://api.github.com/users/Tetimaru/repos","events_url":"https://api.github.com/users/Tetimaru/events{/privacy}","received_events_url":"https://api.github.com/users/Tetimaru/received_events","type":"User","site_admin":false},"body":"#### Command name\r\n`renspoiler <msg>`\r\n\r\n#### What cog is this command from?\r\n`spoilers.py`\r\n\r\n#### What were you expecting to happen?\r\nSpoiler to be generated, but then again, the bot can't react, so we should abort.\r\n\r\n#### What actually happened?\r\nSpoiler is generated and saved, reaction cannot be made, and exception is thrown in console and as a Discord message.\r\n\r\n#### How can we reproduce this issue?\r\n`renspoiler <msg>` in any channel with no react permissions for the bot.\r\n","created_at":"2018-11-18T01:11:09Z","updated_at":"2018-11-18T01:20:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd5e221395e0d4621d083b47839490b60a48d430","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SFUAnime/Ren/pulls/140/commits","review_comments_url":"https://api.github.com/repos/SFUAnime/Ren/pulls/140/comments","review_comment_url":"https://api.github.com/repos/SFUAnime/Ren/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SFUAnime/Ren/issues/140/comments","statuses_url":"https://api.github.com/repos/SFUAnime/Ren/statuses/d8770143a4b39251c48360677d95140fc06d2425","head":{"label":"Tetimaru:Ren-122","ref":"Ren-122","sha":"d8770143a4b39251c48360677d95140fc06d2425","user":{"login":"Tetimaru","id":12128063,"node_id":"MDQ6VXNlcjEyMTI4MDYz","avatar_url":"https://avatars2.githubusercontent.com/u/12128063?v=4","gravatar_id":"","url":"https://api.github.com/users/Tetimaru","html_url":"https://github.com/Tetimaru","followers_url":"https://api.github.com/users/Tetimaru/followers","following_url":"https://api.github.com/users/Tetimaru/following{/other_user}","gists_url":"https://api.github.com/users/Tetimaru/gists{/gist_id}","starred_url":"https://api.github.com/users/Tetimaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tetimaru/subscriptions","organizations_url":"https://api.github.com/users/Tetimaru/orgs","repos_url":"https://api.github.com/users/Tetimaru/repos","events_url":"https://api.github.com/users/Tetimaru/events{/privacy}","received_events_url":"https://api.github.com/users/Tetimaru/received_events","type":"User","site_admin":false},"repo":{"id":155900479,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU5MDA0Nzk=","name":"Ren","full_name":"Tetimaru/Ren","private":false,"owner":{"login":"Tetimaru","id":12128063,"node_id":"MDQ6VXNlcjEyMTI4MDYz","avatar_url":"https://avatars2.githubusercontent.com/u/12128063?v=4","gravatar_id":"","url":"https://api.github.com/users/Tetimaru","html_url":"https://github.com/Tetimaru","followers_url":"https://api.github.com/users/Tetimaru/followers","following_url":"https://api.github.com/users/Tetimaru/following{/other_user}","gists_url":"https://api.github.com/users/Tetimaru/gists{/gist_id}","starred_url":"https://api.github.com/users/Tetimaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tetimaru/subscriptions","organizations_url":"https://api.github.com/users/Tetimaru/orgs","repos_url":"https://api.github.com/users/Tetimaru/repos","events_url":"https://api.github.com/users/Tetimaru/events{/privacy}","received_events_url":"https://api.github.com/users/Tetimaru/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Tetimaru/Ren","description":"SFU Anime Club's Discord bot.  Includes first/third party cogs that are in use.","fork":true,"url":"https://api.github.com/repos/Tetimaru/Ren","forks_url":"https://api.github.com/repos/Tetimaru/Ren/forks","keys_url":"https://api.github.com/repos/Tetimaru/Ren/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tetimaru/Ren/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tetimaru/Ren/teams","hooks_url":"https://api.github.com/repos/Tetimaru/Ren/hooks","issue_events_url":"https://api.github.com/repos/Tetimaru/Ren/issues/events{/number}","events_url":"https://api.github.com/repos/Tetimaru/Ren/events","assignees_url":"https://api.github.com/repos/Tetimaru/Ren/assignees{/user}","branches_url":"https://api.github.com/repos/Tetimaru/Ren/branches{/branch}","tags_url":"https://api.github.com/repos/Tetimaru/Ren/tags","blobs_url":"https://api.github.com/repos/Tetimaru/Ren/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tetimaru/Ren/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tetimaru/Ren/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tetimaru/Ren/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tetimaru/Ren/statuses/{sha}","languages_url":"https://api.github.com/repos/Tetimaru/Ren/languages","stargazers_url":"https://api.github.com/repos/Tetimaru/Ren/stargazers","contributors_url":"https://api.github.com/repos/Tetimaru/Ren/contributors","subscribers_url":"https://api.github.com/repos/Tetimaru/Ren/subscribers","subscription_url":"https://api.github.com/repos/Tetimaru/Ren/subscription","commits_url":"https://api.github.com/repos/Tetimaru/Ren/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tetimaru/Ren/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tetimaru/Ren/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tetimaru/Ren/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tetimaru/Ren/contents/{+path}","compare_url":"https://api.github.com/repos/Tetimaru/Ren/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tetimaru/Ren/merges","archive_url":"https://api.github.com/repos/Tetimaru/Ren/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tetimaru/Ren/downloads","issues_url":"https://api.github.com/repos/Tetimaru/Ren/issues{/number}","pulls_url":"https://api.github.com/repos/Tetimaru/Ren/pulls{/number}","milestones_url":"https://api.github.com/repos/Tetimaru/Ren/milestones{/number}","notifications_url":"https://api.github.com/repos/Tetimaru/Ren/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tetimaru/Ren/labels{/name}","releases_url":"https://api.github.com/repos/Tetimaru/Ren/releases{/id}","deployments_url":"https://api.github.com/repos/Tetimaru/Ren/deployments","created_at":"2018-11-02T17:33:08Z","updated_at":"2018-11-16T19:41:42Z","pushed_at":"2018-11-18T01:07:50Z","git_url":"git://github.com/Tetimaru/Ren.git","ssh_url":"git@github.com:Tetimaru/Ren.git","clone_url":"https://github.com/Tetimaru/Ren.git","svn_url":"https://github.com/Tetimaru/Ren","homepage":"","size":5244,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"prod"}},"base":{"label":"SFUAnime:testing","ref":"testing","sha":"f0ff7b20c50637e8a424314784848261de608516","user":{"login":"SFUAnime","id":20249010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMjQ5MDEw","avatar_url":"https://avatars0.githubusercontent.com/u/20249010?v=4","gravatar_id":"","url":"https://api.github.com/users/SFUAnime","html_url":"https://github.com/SFUAnime","followers_url":"https://api.github.com/users/SFUAnime/followers","following_url":"https://api.github.com/users/SFUAnime/following{/other_user}","gists_url":"https://api.github.com/users/SFUAnime/gists{/gist_id}","starred_url":"https://api.github.com/users/SFUAnime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFUAnime/subscriptions","organizations_url":"https://api.github.com/users/SFUAnime/orgs","repos_url":"https://api.github.com/users/SFUAnime/repos","events_url":"https://api.github.com/users/SFUAnime/events{/privacy}","received_events_url":"https://api.github.com/users/SFUAnime/received_events","type":"Organization","site_admin":false},"repo":{"id":76699803,"node_id":"MDEwOlJlcG9zaXRvcnk3NjY5OTgwMw==","name":"Ren","full_name":"SFUAnime/Ren","private":false,"owner":{"login":"SFUAnime","id":20249010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMjQ5MDEw","avatar_url":"https://avatars0.githubusercontent.com/u/20249010?v=4","gravatar_id":"","url":"https://api.github.com/users/SFUAnime","html_url":"https://github.com/SFUAnime","followers_url":"https://api.github.com/users/SFUAnime/followers","following_url":"https://api.github.com/users/SFUAnime/following{/other_user}","gists_url":"https://api.github.com/users/SFUAnime/gists{/gist_id}","starred_url":"https://api.github.com/users/SFUAnime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFUAnime/subscriptions","organizations_url":"https://api.github.com/users/SFUAnime/orgs","repos_url":"https://api.github.com/users/SFUAnime/repos","events_url":"https://api.github.com/users/SFUAnime/events{/privacy}","received_events_url":"https://api.github.com/users/SFUAnime/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SFUAnime/Ren","description":"SFU Anime Club's Discord bot.  Includes first/third party cogs that are in use.","fork":true,"url":"https://api.github.com/repos/SFUAnime/Ren","forks_url":"https://api.github.com/repos/SFUAnime/Ren/forks","keys_url":"https://api.github.com/repos/SFUAnime/Ren/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SFUAnime/Ren/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SFUAnime/Ren/teams","hooks_url":"https://api.github.com/repos/SFUAnime/Ren/hooks","issue_events_url":"https://api.github.com/repos/SFUAnime/Ren/issues/events{/number}","events_url":"https://api.github.com/repos/SFUAnime/Ren/events","assignees_url":"https://api.github.com/repos/SFUAnime/Ren/assignees{/user}","branches_url":"https://api.github.com/repos/SFUAnime/Ren/branches{/branch}","tags_url":"https://api.github.com/repos/SFUAnime/Ren/tags","blobs_url":"https://api.github.com/repos/SFUAnime/Ren/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SFUAnime/Ren/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SFUAnime/Ren/git/refs{/sha}","trees_url":"https://api.github.com/repos/SFUAnime/Ren/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SFUAnime/Ren/statuses/{sha}","languages_url":"https://api.github.com/repos/SFUAnime/Ren/languages","stargazers_url":"https://api.github.com/repos/SFUAnime/Ren/stargazers","contributors_url":"https://api.github.com/repos/SFUAnime/Ren/contributors","subscribers_url":"https://api.github.com/repos/SFUAnime/Ren/subscribers","subscription_url":"https://api.github.com/repos/SFUAnime/Ren/subscription","commits_url":"https://api.github.com/repos/SFUAnime/Ren/commits{/sha}","git_commits_url":"https://api.github.com/repos/SFUAnime/Ren/git/commits{/sha}","comments_url":"https://api.github.com/repos/SFUAnime/Ren/comments{/number}","issue_comment_url":"https://api.github.com/repos/SFUAnime/Ren/issues/comments{/number}","contents_url":"https://api.github.com/repos/SFUAnime/Ren/contents/{+path}","compare_url":"https://api.github.com/repos/SFUAnime/Ren/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SFUAnime/Ren/merges","archive_url":"https://api.github.com/repos/SFUAnime/Ren/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SFUAnime/Ren/downloads","issues_url":"https://api.github.com/repos/SFUAnime/Ren/issues{/number}","pulls_url":"https://api.github.com/repos/SFUAnime/Ren/pulls{/number}","milestones_url":"https://api.github.com/repos/SFUAnime/Ren/milestones{/number}","notifications_url":"https://api.github.com/repos/SFUAnime/Ren/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SFUAnime/Ren/labels{/name}","releases_url":"https://api.github.com/repos/SFUAnime/Ren/releases{/id}","deployments_url":"https://api.github.com/repos/SFUAnime/Ren/deployments","created_at":"2016-12-17T02:43:52Z","updated_at":"2018-11-16T22:59:10Z","pushed_at":"2018-11-18T01:11:10Z","git_url":"git://github.com/SFUAnime/Ren.git","ssh_url":"git@github.com:SFUAnime/Ren.git","clone_url":"https://github.com/SFUAnime/Ren.git","svn_url":"https://github.com/SFUAnime/Ren","homepage":"","size":5228,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":8,"open_issues":19,"watchers":3,"default_branch":"prod"}},"_links":{"self":{"href":"https://api.github.com/repos/SFUAnime/Ren/pulls/140"},"html":{"href":"https://github.com/SFUAnime/Ren/pull/140"},"issue":{"href":"https://api.github.com/repos/SFUAnime/Ren/issues/140"},"comments":{"href":"https://api.github.com/repos/SFUAnime/Ren/issues/140/comments"},"review_comments":{"href":"https://api.github.com/repos/SFUAnime/Ren/pulls/140/comments"},"review_comment":{"href":"https://api.github.com/repos/SFUAnime/Ren/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SFUAnime/Ren/pulls/140/commits"},"statuses":{"href":"https://api.github.com/repos/SFUAnime/Ren/statuses/d8770143a4b39251c48360677d95140fc06d2425"}},"author_association":"NONE"}}
{"actor":{"display_login":"Injabie3"}}