Skip to content

Commit

Permalink
Set startup activity
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyissillyyy committed May 29, 2024
1 parent f3f53db commit eb86447
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Xiao.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ const { XIAO_TOKEN, OWNERS, XIAO_PREFIX, INVITE } = process.env;
const { mkdir } = require('fs/promises');
const path = require('path');
const math = require('mathjs');
const { GatewayIntentBits, Partials, AllowedMentionsTypes, PermissionFlagsBits, EmbedBuilder } = require('discord.js');
const {
GatewayIntentBits,
Partials,
AllowedMentionsTypes,
PermissionFlagsBits,
EmbedBuilder,
ActivityType
} = require('discord.js');
const Client = require('./structures/Client');
const client = new Client({
commandPrefix: XIAO_PREFIX,
Expand Down Expand Up @@ -117,6 +124,7 @@ client.on('ready', async () => {
}

// Interval to change activity every minute
client.user.setActivity('Good morning, world!', { type: ActivityType.Custom });
setInterval(() => {
const activity = client.activities[Math.floor(Math.random() * client.activities.length)];
const text = typeof activity.text === 'function' ? activity.text(client) : activity.text;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "152.0.1",
"version": "152.0.2",
"description": "Your personal server companion.",
"main": "Xiao.js",
"private": true,
Expand Down

0 comments on commit eb86447

Please sign in to comment.