HiddenPhox/src/modules/status.js

24 lines
616 B
JavaScript
Raw Normal View History

2021-05-17 22:35:25 +00:00
const statuses = [
{type: 0, text: "on %servers% servers"},
{type: 0, text: "with %users% users"},
{type: 0, text: "with %commands% commands"},
];
function setStatus() {
const status = statuses[Math.floor(Math.random() * statuses.length)];
const text = status.text
.replace("%servers%", hf.bot.guilds.size)
.replace("%users%", hf.bot.users.size)
.replace("%commands%", hf.commands.size);
2022-10-10 15:58:14 +00:00
hf.bot.editStatus("online", [
{
type: status.type,
name: `${text} | ${hf.config.prefix}help`,
},
]);
2021-05-17 22:35:25 +00:00
}
hf.bot.once("ready", setStatus);
hf.timer.add("status", setStatus, 300000);