twitch_bot/commands/fill.js

25 lines
594 B
JavaScript

const command = {
name: "fill",
desc: "fill the chat with something",
restricted: false,
run: async (client, msg, splitted) => {
if (!splitted[2]) {
client
.say(msg.channelName, `${msg.displayName}, Supply an arg PoroSad`)
.catch((err) => console.log(err));
return;
}
let str = "";
while (true) {
if (str.length + splitted.slice(2).join(" ").length >= 450) break;
str += `${splitted.slice(2).join(" ")} `;
}
await client.me(msg.channelName, str).catch((err) => console.log(err));
},
};
module.exports = { command };