mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Error Catching in Meme
This commit is contained in:
@@ -36,7 +36,7 @@ class MemeCommand extends commando.Command {
|
|||||||
message.channel.sendMessage(":x: Error! Top text is over 100 characters!");
|
message.channel.sendMessage(":x: Error! Top text is over 100 characters!");
|
||||||
} else {
|
} else {
|
||||||
if(memecodes.memecodes[type]) {
|
if(memecodes.memecodes[type]) {
|
||||||
message.channel.sendFile(link);
|
message.channel.sendFile(link).catch(error => message.channel.sendMessage(":x: An Error Occurred! Please try again later!"));
|
||||||
} else {
|
} else {
|
||||||
message.channel.sendMessage(":x: Error! Meme type not found! (View list with ;meme list)");
|
message.channel.sendMessage(":x: Error! Meme type not found! (View list with ;meme list)");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user