Fix crash on failing to send gif
This commit is contained in:
parent
41ae943913
commit
80a0dbd2d3
|
@ -21,7 +21,7 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
|
||||||
.then(bot_user => {
|
.then(bot_user => {
|
||||||
|
|
||||||
const default_text = (command, text) => `Do you want to ${text} `
|
const default_text = (command, text) => `Do you want to ${text} `
|
||||||
+ `yourself?\nIf no, reply to someone with /${command} to kill`
|
+ `yourself?\nIf no, reply to someone with /${command} to ${command}`
|
||||||
+ ` them or run /${command} username/name.\nYou can suggest `
|
+ ` them or run /${command} username/name.\nYou can suggest `
|
||||||
+ `more /${command} replies using /feedback`;
|
+ `more /${command} replies using /feedback`;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ module.exports = (forms, getGif) => (ctx) => {
|
||||||
reply = forms.none
|
reply = forms.none
|
||||||
.replace("{}", user);
|
.replace("{}", user);
|
||||||
|
|
||||||
getGif()
|
return getGif()
|
||||||
.then(gif => ctx.replyWithAnimation(gif.data.url, {caption: reply}));
|
.then(gif => ctx.replyWithAnimation(gif.data.url, {caption: reply}));
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue