@@ -13,40 +13,40 @@ module.exports.run = async (bot, message, args) => {
1313 const channel = message . channel ;
1414
1515 const bugFormDialogue = {
16- name : ` Please enter the name of the affected script/hack.` ,
17- desc : ` Please write a short description about the bug.` ,
18- reproSteps : ` Please write out the steps needed to reproduce the error. Seperate each step by a comma.` ,
19- expectedResult : ` Please enter the expected result of the script. (The one that would occur if the bug were fixed.)` ,
20- actualResult : ` Please enter the actual result of the script. (The one that occurs now.)`
21- }
16+ name : " Please enter the name of the affected script/hack." ,
17+ desc : " Please write a short description about the bug." ,
18+ reproSteps : " Please write out the steps needed to reproduce the error. Seperate each step by a comma." ,
19+ expectedResult : " Please enter the expected result of the script. (The one that would occur if the bug were fixed.)" ,
20+ actualResult : " Please enter the actual result of the script. (The one that occurs now.)"
21+ } ;
2222
2323 if ( bot . reporting . has ( member . id ) ) return ;
2424 if ( channel . type != "dm" ) {
2525 message . delete ( 0 ) ;
26- return error ( "ERROR: Please run this command in a DM." )
26+ return error ( "ERROR: Please run this command in a DM." ) ;
2727 } else {
28- bot . reporting . add ( member . id )
29- await bugForm ( channel )
30- bot . reporting . delete ( member . id )
28+ bot . reporting . add ( member . id ) ;
29+ await bugForm ( channel ) ;
30+ bot . reporting . delete ( member . id ) ;
3131
3232 const confirmationEmbed = new Discord . RichEmbed ( )
33- . setAuthor ( ' Reviewer -' , bot . avatarURL )
33+ . setAuthor ( " Reviewer -" , bot . avatarURL )
3434 . setTitle ( "SUCCESS" )
35- . setDescription ( ` Your bug report has been successfully sent! If it gets accepted, you can become a bug hunter! :tada:` )
35+ . setDescription ( " Your bug report has been successfully sent! If it gets accepted, you can become a bug hunter! :tada:" )
3636 . setColor ( colors . valid ) ;
37- await channel . send ( confirmationEmbed )
37+ await channel . send ( confirmationEmbed ) ;
3838 }
3939
4040 // Ask for additional information for bug submission
4141 async function bugForm ( channel ) {
4242 let dialogueResults = [ ] ;
4343 for ( const line of Object . entries ( bugFormDialogue ) ) {
4444 const dialogueEmbed = new Discord . RichEmbed ( )
45- . setAuthor ( ' Reviewer -' , bot . avatarURL )
46- . setTitle ( "BUG REPORT FORM" )
47- . setDescription ( line )
45+ . setAuthor ( " Reviewer -" , bot . avatarURL )
46+ . setTitle ( "BUG REPORT FORM" )
47+ . setDescription ( line )
4848 . setColor ( colors . info ) ;
49- await channel . send ( dialogueEmbed ) . then ( async ( ) => await waitForResponse ( dialogueResults ) )
49+ await channel . send ( dialogueEmbed ) . then ( async ( ) => await waitForResponse ( dialogueResults ) ) ;
5050 }
5151
5252 let report = new BugReport ( member , ...dialogueResults ) ;
@@ -58,9 +58,9 @@ module.exports.run = async (bot, message, args) => {
5858 collected . forEach ( async ( msg ) => {
5959 await Promise . resolve (
6060 filter ( msg ) ? msg . content : await waitForResponse ( dialogueResults )
61- ) . then ( val => dialogueResults . push ( val . slice ( 0 , 800 ) ) )
62- } )
63- } )
61+ ) . then ( val => dialogueResults . push ( val . slice ( 0 , 800 ) ) ) ;
62+ } ) ;
63+ } ) ;
6464 }
6565 // Submit to bug queue with unique id
6666 async function submit ( bugReport ) {
@@ -71,27 +71,27 @@ module.exports.run = async (bot, message, args) => {
7171 reportsArr . push ( bugReport ) ;
7272
7373 const reportsJSON = JSON . stringify ( reportsArr ) ;
74- fs . writeFile ( ' ./reports.json' , reportsJSON , ' utf8' , err => {
75- if ( err ) console . error ( err )
74+ fs . writeFile ( " ./reports.json" , reportsJSON , " utf8" , err => {
75+ if ( err ) console . error ( err ) ;
7676 } ) ;
77- } )
77+ } ) ;
7878 }
7979
8080 // Error Handler
8181
8282 function error ( errorMessage ) {
8383 const errorEmbed = new Discord . RichEmbed ( )
84- . setAuthor ( ' Reviewer -' , bot . avatarURL )
84+ . setAuthor ( " Reviewer -" , bot . avatarURL )
8585 . setTitle ( "ERROR" )
8686 . setDescription ( `${ errorMessage } \nBug reporting process halted. Please run the command again to restart your report.` )
87- . setColor ( colors . error )
87+ . setColor ( colors . error ) ;
8888 channel . send ( errorEmbed ) . then ( msg => msg . delete ( 5000 ) ) ;
8989 return new Error ( errorMessage ) ;
9090 }
91- }
91+ } ;
9292
9393
9494module . exports . help = {
9595 name : "report" ,
9696 description :"Issues a new bug report. Can only be run in a DM with the Reviewer bot."
97- }
97+ } ;
0 commit comments