radium-v2/commands/echo.js

19 lines
No EOL
503 B
JavaScript

const desc = "make the bot say something";
const usages = " - echo <text>";
const trustLevel = 0;
function inject (client) {
const command = ((args) => {
if (!args.join(" ").startsWith("/")) {
if (args.join(" ")) {
client.chat(args.join(" "));
} else {
client.cmdError("Expected string");
}
}
})
client.runCommand = command;
return command;
}
module.exports = { inject, desc, usages, trustLevel };