Added (hacky) message command support, lots of work to prepare for message content intent enforcement, improve broadcast, remove evalraw, update packages
This commit is contained in:
parent
3392c3c89e
commit
d33a7804d7
56 changed files with 443 additions and 315 deletions
|
@ -14,6 +14,7 @@ class AncientCommand extends Command {
|
|||
return data.headers.location;
|
||||
} catch (e) {
|
||||
if (e.name === "AbortError") {
|
||||
this.success = false;
|
||||
return "I couldn't get a meme in time. Maybe try again?";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ class BirdCommand extends Command {
|
|||
return json[0];
|
||||
} catch (e) {
|
||||
if (e.name === "AbortError") {
|
||||
this.success = false;
|
||||
return "I couldn't get a bird image in time. Maybe try again?";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ class CatCommand extends Command {
|
|||
return data.headers.location;
|
||||
} catch (e) {
|
||||
if (e.name === "AbortError") {
|
||||
this.success = false;
|
||||
return "I couldn't get a cat image in time. Maybe try again?";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ class DogCommand extends Command {
|
|||
return json.message;
|
||||
} catch (e) {
|
||||
if (e.name === "AbortError") {
|
||||
this.success = false;
|
||||
return "I couldn't get a dog image in time. Maybe try again?";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ class WikihowCommand extends Command {
|
|||
}
|
||||
} catch (e) {
|
||||
if (e.name === "AbortError") {
|
||||
this.success = false;
|
||||
return "I couldn't get a WikiHow image in time. Maybe try again?";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue