twitch_bot/commands/fill.js

22 lines
520 B
JavaScript

const command = {
name: "fill",
desc: "fill the chat with something",
run: async (client, msg, splitted) => {
if (!splitted[2]) {
client.say(msg.channelName, `${msg.displayName}, Supply an arg PoroSad`);
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));
},
};
export default { command };