mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
error handling for emojimix
This commit is contained in:
parent
2d57a75e9b
commit
7573b38c97
1 changed files with 14 additions and 10 deletions
|
@ -92,19 +92,23 @@ module.exports = {
|
||||||
|
|
||||||
// Emoji Mixing
|
// Emoji Mixing
|
||||||
if(emoji.length >= 2){
|
if(emoji.length >= 2){
|
||||||
let em = await emojiKitchen(emoji)
|
try{
|
||||||
if(!em.body.results[0]){
|
let em = await emojiKitchen(emoji)
|
||||||
for(const em of emoji){
|
if(!em.body.results[0]){
|
||||||
try{
|
for(const em of emoji){
|
||||||
await emojiKitchen([em])
|
try{
|
||||||
}catch(e){
|
await emojiKitchen([em])
|
||||||
return editOrReply(context, createEmbed("warning", context, `Unsupported Emoji (${em})`))
|
}catch(e){
|
||||||
|
return editOrReply(context, createEmbed("warning", context, `Unsupported Emoji (${em})`))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return editOrReply(context, createEmbed("error", context, "Combination not supported."))
|
||||||
}
|
}
|
||||||
|
return editOrReply(context, createEmbed("image", context, { url: em.body.results[0].url }))
|
||||||
return editOrReply(context, createEmbed("error", context, "Combination not supported."))
|
}catch(e){
|
||||||
|
return editOrReply(context, createEmbed("error", context, "Unable to mix emoji."))
|
||||||
}
|
}
|
||||||
return editOrReply(context, createEmbed("image", context, { url: em.body.results[0].url }))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regular Emoji Handling
|
// Regular Emoji Handling
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue