mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Merge pull request #6 from JonnyBro/appcommands
This commit is contained in:
commit
d178907eb2
3 changed files with 13 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
const BaseEvent = require("../base/BaseEvent");
|
||||
const { InteractionType } = require("discord.js");
|
||||
const BaseEvent = require("../base/BaseEvent");
|
||||
|
||||
class CommandHandler extends BaseEvent {
|
||||
constructor() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { PermissionsBitField } = require("discord.js"),
|
||||
xpCooldown = {},
|
||||
BaseEvent = require("../base/BaseEvent");
|
||||
const { PermissionsBitField } = require("discord.js");
|
||||
const BaseEvent = require("../base/BaseEvent"),
|
||||
xpCooldown = {};
|
||||
|
||||
class MessageCreate extends BaseEvent {
|
||||
constructor() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const BaseEvent = require("../base/BaseEvent"),
|
||||
{ PermissionsBitField } = require("discord.js");
|
||||
const { PermissionsBitField, ActivityType } = require("discord.js");
|
||||
const BaseEvent = require("../base/BaseEvent");
|
||||
|
||||
class Ready extends BaseEvent {
|
||||
constructor() {
|
||||
|
@ -45,10 +45,10 @@ class Ready extends BaseEvent {
|
|||
// Update status
|
||||
const version = require("../package.json").version;
|
||||
const status = [
|
||||
{ name: "help", type: "LISTENING" },
|
||||
{ name: `${commands.length} ${client.getNoun(commands.length, client.translate("misc:NOUNS:COMMANDS:1"), client.translate("misc:NOUNS:COMMANDS:2"), client.translate("misc:NOUNS:COMMANDS:5"))}`, type: "LISTENING"},
|
||||
{ name: `${tServers} ${client.getNoun(tServers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`, type: "WATCHING" },
|
||||
{ name: `${tUsers} ${client.getNoun(tUsers, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))}`, type: "WATCHING" }
|
||||
{ name: "help", type: ActivityType.Watching },
|
||||
{ name: `${commands.length} ${client.getNoun(commands.length, client.translate("misc:NOUNS:COMMANDS:1"), client.translate("misc:NOUNS:COMMANDS:2"), client.translate("misc:NOUNS:COMMANDS:5"))}`, type: ActivityType.Listening },
|
||||
{ name: `${tServers} ${client.getNoun(tServers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`, type: ActivityType.Watching },
|
||||
{ name: `${tUsers} ${client.getNoun(tUsers, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))}`, type: ActivityType.Watching }
|
||||
];
|
||||
|
||||
let i = 0;
|
||||
|
@ -56,15 +56,15 @@ class Ready extends BaseEvent {
|
|||
hiddenGuild = await client.guilds.fetch("568120814776614924");
|
||||
tUsers = client.users.cache.size - hiddenGuild.memberCount;
|
||||
tServers = client.guilds.cache.size - 1;
|
||||
const toShow = status[parseInt(i, 10)];
|
||||
const toShow = status[i];
|
||||
|
||||
client.user.setActivity(`${toShow.name} | v${version}`, {
|
||||
type: toShow.type
|
||||
});
|
||||
|
||||
if (status[parseInt(i + 1, 10)]) i++;
|
||||
if (status[i + 1]) i++;
|
||||
else i = 0;
|
||||
}, 10 * 1000); // Every 10 seconds
|
||||
}, 10000); // Every 10 seconds
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue