added welcome-leave commands and updated activitytypes
This commit is contained in:
@@ -1,14 +1,30 @@
|
||||
const { ActivityType } = require('discord.js');
|
||||
const deployCommands = require('../deploy-commands');
|
||||
|
||||
module.exports = {
|
||||
name: 'clientReady',
|
||||
once: true,
|
||||
execute(client) {
|
||||
async execute(client) {
|
||||
console.log('ECS - Full Stack Bot Online!');
|
||||
|
||||
client.user.setActivity('ehchad', {
|
||||
type: ActivityType.Streaming,
|
||||
url: 'https://twitch.tv/ehchad'
|
||||
});
|
||||
const guilds = client.guilds.cache.map(guild => guild.id);
|
||||
for (const guildId of guilds) {
|
||||
await deployCommands(guildId);
|
||||
}
|
||||
|
||||
const activities = [
|
||||
{ name: 'Watch EhChad Live!', type: ActivityType.Streaming, url: 'https://twitch.tv/ehchad' },
|
||||
{ name: 'Follow EhChad!', type: ActivityType.Streaming, url: 'https://twitch.tv/ehchad' },
|
||||
{ name: '/help', type: ActivityType.Streaming, url: 'https://twitch.tv/ehchad' },
|
||||
{ name: 'EhChadServices', type: ActivityType.Streaming, url: 'https://twitch.tv/ehchad' },
|
||||
];
|
||||
|
||||
let activityIndex = 0;
|
||||
|
||||
setInterval(() => {
|
||||
const activity = activities[activityIndex];
|
||||
client.user.setActivity(activity.name, { type: activity.type, url: activity.url });
|
||||
activityIndex = (activityIndex + 1) % activities.length;
|
||||
}, 3000);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user