46 lines
680 B
JavaScript
46 lines
680 B
JavaScript
|
var meows = [
|
||
|
"mreow",
|
||
|
"miau",
|
||
|
"mewo",
|
||
|
"maow",
|
||
|
"mrow",
|
||
|
"mrao",
|
||
|
"meow",
|
||
|
"mew",
|
||
|
"nya",
|
||
|
];
|
||
|
|
||
|
var emoticons = [
|
||
|
":3",
|
||
|
"^w^",
|
||
|
"=^w^=",
|
||
|
"-w-",
|
||
|
":333"
|
||
|
];
|
||
|
|
||
|
async function onMessage(client, event) {
|
||
|
if(event.event.content["m.new_content"] != null) return;
|
||
|
|
||
|
for(const meow of meows) {
|
||
|
if(event.event.content.body.toLowerCase().includes(meow)) {
|
||
|
var reply = meows.random();
|
||
|
reply += "!".repeat(Math.random()*5)
|
||
|
|
||
|
if(Math.random() > 0.5) {
|
||
|
reply += " " + emoticons.random();
|
||
|
}
|
||
|
|
||
|
client.reply(event, reply);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default {
|
||
|
name: "meow",
|
||
|
desc: ":33",
|
||
|
hooks: {
|
||
|
message: onMessage
|
||
|
}
|
||
|
}
|