twitch_bot/commands/fill.js

27 lines
553 B
JavaScript
Raw Normal View History

2023-02-01 12:04:14 +01:00
const command = {
name: "fill",
desc: "fill the chat with something",
2023-02-02 23:37:42 +01:00
restricted: false,
2023-02-02 23:58:58 +01:00
mod: true,
2023-02-01 12:04:14 +01:00
run: async (client, msg, splitted) => {
if (!splitted[2]) {
2023-02-11 13:48:05 +01:00
await client.say(
msg.channelName,
`${msg.displayName}, Supply an arg PoroSad`
);
return;
2023-02-01 12:04:14 +01:00
}
let str = "";
while (true) {
if (str.length + splitted.slice(2).join(" ").length >= 450) break;
str += `${splitted.slice(2).join(" ")} `;
}
2023-02-11 13:48:05 +01:00
await client.me(msg.channelName, str);
2023-02-01 12:04:14 +01:00
},
};
2023-02-01 22:11:48 +01:00
module.exports = { command };