{"action":"created","issue":{"url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/issues/488","repository_url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server","labels_url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/issues/488/comments","events_url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/issues/488/events","html_url":"https://github.com/Bro-Time/Bro-Time-Server/issues/488","id":332745410,"node_id":"MDU6SXNzdWUzMzI3NDU0MTA=","number":488,"title":"Why .catch(() => {}) should be allowed on message sending in d.js","user":{"login":"gt-c","id":28969308,"node_id":"MDQ6VXNlcjI4OTY5MzA4","avatar_url":"https://avatars1.githubusercontent.com/u/28969308?v=4","gravatar_id":"","url":"https://api.github.com/users/gt-c","html_url":"https://github.com/gt-c","followers_url":"https://api.github.com/users/gt-c/followers","following_url":"https://api.github.com/users/gt-c/following{/other_user}","gists_url":"https://api.github.com/users/gt-c/gists{/gist_id}","starred_url":"https://api.github.com/users/gt-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gt-c/subscriptions","organizations_url":"https://api.github.com/users/gt-c/orgs","repos_url":"https://api.github.com/users/gt-c/repos","events_url":"https://api.github.com/users/gt-c/events{/privacy}","received_events_url":"https://api.github.com/users/gt-c/received_events","type":"User","site_admin":false},"labels":[{"id":771906683,"node_id":"MDU6TGFiZWw3NzE5MDY2ODM=","url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/labels/bug","name":"bug","color":"ee0701","default":true},{"id":908826663,"node_id":"MDU6TGFiZWw5MDg4MjY2NjM=","url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/labels/change","name":"change","color":"5f4baa","default":false},{"id":931929062,"node_id":"MDU6TGFiZWw5MzE5MjkwNjI=","url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/labels/proposal","name":"proposal","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"cloewen8","id":1569808,"node_id":"MDQ6VXNlcjE1Njk4MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/1569808?v=4","gravatar_id":"","url":"https://api.github.com/users/cloewen8","html_url":"https://github.com/cloewen8","followers_url":"https://api.github.com/users/cloewen8/followers","following_url":"https://api.github.com/users/cloewen8/following{/other_user}","gists_url":"https://api.github.com/users/cloewen8/gists{/gist_id}","starred_url":"https://api.github.com/users/cloewen8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloewen8/subscriptions","organizations_url":"https://api.github.com/users/cloewen8/orgs","repos_url":"https://api.github.com/users/cloewen8/repos","events_url":"https://api.github.com/users/cloewen8/events{/privacy}","received_events_url":"https://api.github.com/users/cloewen8/received_events","type":"User","site_admin":false},"assignees":[{"login":"cloewen8","id":1569808,"node_id":"MDQ6VXNlcjE1Njk4MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/1569808?v=4","gravatar_id":"","url":"https://api.github.com/users/cloewen8","html_url":"https://github.com/cloewen8","followers_url":"https://api.github.com/users/cloewen8/followers","following_url":"https://api.github.com/users/cloewen8/following{/other_user}","gists_url":"https://api.github.com/users/cloewen8/gists{/gist_id}","starred_url":"https://api.github.com/users/cloewen8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloewen8/subscriptions","organizations_url":"https://api.github.com/users/cloewen8/orgs","repos_url":"https://api.github.com/users/cloewen8/repos","events_url":"https://api.github.com/users/cloewen8/events{/privacy}","received_events_url":"https://api.github.com/users/cloewen8/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-15T11:51:52Z","updated_at":"2018-06-15T21:39:38Z","closed_at":null,"author_association":"COLLABORATOR","body":"First of all there are a few set rules that can be easily avoided by the coder:\r\n- Max length of message exceeds 2000 characters.\r\n- Cannot send an empty message.\r\nThen comes the API errors:\r\n- DiscordAPIError: Missing Permissions, when the message cannot be sent due to lack of permission, whether the bot is not allowed to send messages, or if it cannot send embeds.\r\n\r\nFirst we can eliminate the first two (`max-length` and `empty-message`) because the coder can easily avoid these if they want to. Now with the third one we can have it tell the user that it cannot speak in that channel if it runs into an error. If the user has dms off it simply ignores the error because it can't do anything to tell the user that it can't speak in that channel.\r\n\r\n@cloewen8 You stated that what if there was a Discord API problem and we needed to see the error. First off, if there was a Discord API problem the bot would likely be down, and even if it wasn't, there would be no way of fixing it since it's Discord API not Bro Bot API.\r\n\r\nOverall, message sending errors should not be logged as all it does is produces log spam."},"comment":{"url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/issues/comments/397749307","html_url":"https://github.com/Bro-Time/Bro-Time-Server/issues/488#issuecomment-397749307","issue_url":"https://api.github.com/repos/Bro-Time/Bro-Time-Server/issues/488","id":397749307,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Nzc0OTMwNw==","user":{"login":"cloewen8","id":1569808,"node_id":"MDQ6VXNlcjE1Njk4MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/1569808?v=4","gravatar_id":"","url":"https://api.github.com/users/cloewen8","html_url":"https://github.com/cloewen8","followers_url":"https://api.github.com/users/cloewen8/followers","following_url":"https://api.github.com/users/cloewen8/following{/other_user}","gists_url":"https://api.github.com/users/cloewen8/gists{/gist_id}","starred_url":"https://api.github.com/users/cloewen8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloewen8/subscriptions","organizations_url":"https://api.github.com/users/cloewen8/orgs","repos_url":"https://api.github.com/users/cloewen8/repos","events_url":"https://api.github.com/users/cloewen8/events{/privacy}","received_events_url":"https://api.github.com/users/cloewen8/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T21:39:38Z","updated_at":"2018-06-15T21:39:38Z","author_association":"MEMBER","body":"The first rule is unrelated (you can't deploy it in the first place). That last rule can be accounted for if they check for permissions first (#465 for commands).\r\n\r\nThe default error handler is meant for exceptional situations. The last coarse of action is to log the error for administrators to take note of and potentially submit a bug report for (either for discord.js or our own server). There are some discord errors that we can account for (such as missing peer dependencies).\r\n\r\nThere are ways we can handle connection errors (send an email, stop handling events until ready, try another bot). If you have any suggestions, feel free to suggest them. We should never silently ignore all errors, especially from a framework that we do not control."}}
{"actor":{"display_login":"cloewen8"}}