mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
custom statuses
This commit is contained in:
parent
e2bd32cb3a
commit
b4dd085ea7
1 changed files with 10 additions and 8 deletions
|
@ -36,22 +36,24 @@ class Ready extends BaseEvent {
|
||||||
|
|
||||||
const version = require("../package.json").version;
|
const version = require("../package.json").version;
|
||||||
const status = [
|
const status = [
|
||||||
{ name: "/help", type: ActivityType.Watching },
|
"Use /help to get commands list",
|
||||||
{ name: `${commands.length} ${client.functions.getNoun(commands.length, client.translate("misc:NOUNS:COMMANDS:1"), client.translate("misc:NOUNS:COMMANDS:2"), client.translate("misc:NOUNS:COMMANDS:5"))}`, type: ActivityType.Listening },
|
`${commands.length} ${client.functions.getNoun(commands.length, client.translate("misc:NOUNS:COMMANDS:1"), client.translate("misc:NOUNS:COMMANDS:2"), client.translate("misc:NOUNS:COMMANDS:5"))} available!`,
|
||||||
{ name: `${servers} ${client.functions.getNoun(servers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`, type: ActivityType.Watching },
|
`Bot is in ${servers} ${client.functions.getNoun(servers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`,
|
||||||
{ name: `${users} ${client.functions.getNoun(users, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))}`, type: ActivityType.Watching },
|
`Cached ${users} ${client.functions.getNoun(users, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))}`,
|
||||||
];
|
];
|
||||||
|
|
||||||
let i = 0;
|
let i = 0;
|
||||||
setInterval(async function () {
|
setInterval(() => {
|
||||||
servers = client.guilds.cache.size;
|
servers = client.guilds.fetch().then(g => g.size);
|
||||||
users = 0;
|
users = 0;
|
||||||
client.guilds.cache.forEach(g => {
|
client.guilds.cache.forEach(g => {
|
||||||
users += g.memberCount;
|
users += g.memberCount;
|
||||||
});
|
});
|
||||||
|
|
||||||
client.user.setActivity(`${status[i].name} | v${version}`, {
|
client.user.setActivity({
|
||||||
type: status[i].type,
|
type: ActivityType.Custom,
|
||||||
|
name: "custom",
|
||||||
|
state: `${status[i]} | v${version}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (status[i + 1]) i++;
|
if (status[i + 1]) i++;
|
||||||
|
|
Loading…
Reference in a new issue