Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Rost authored Aug 26, 2018
1 parent 4763495 commit 0e7e36a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function cmd_say(lang, msg, args, line) {
}
}
if ( text || imgs[0] ) {
msg.channel.send( text, {disableEveryone:false,files:imgs} ).then( message => msg.delete(), error => msg.react('440871715938238494') );
msg.channel.send( text, {disableEveryone:false,files:imgs} ).then( message => msg.delete().catch( error => console.log( error.name + ': ' + error.message ) ), error => msg.react('440871715938238494') );
}
} else {
msg.react('❌');
Expand Down Expand Up @@ -511,7 +511,7 @@ function cmd_umfrage(lang, msg, args, line) {

function cmd_sendumfrage(lang, msg, args, reactions, imgs, i) {
msg.channel.send( lang.poll.title + args.slice(i).join(' '), {disableEveryone:false,files:imgs} ).then( poll => {
msg.delete();
msg.delete().catch( error => console.log( error.name + ': ' + error.message ) );
if ( reactions.length ) {
reactions.forEach( function(entry) {
poll.react(entry).catch( error => poll.react('440871715938238494') );
Expand Down

0 comments on commit 0e7e36a

Please sign in to comment.