mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Rich Presence
This commit is contained in:
+3
-8
@@ -9,6 +9,7 @@ const client = new CommandoClient({
|
|||||||
unknownCommandResponse: false,
|
unknownCommandResponse: false,
|
||||||
disabledEvents: ['TYPING_START']
|
disabledEvents: ['TYPING_START']
|
||||||
});
|
});
|
||||||
|
const activities = require('./assets/json/activity');
|
||||||
|
|
||||||
client.registry
|
client.registry
|
||||||
.registerDefaultTypes()
|
.registerDefaultTypes()
|
||||||
@@ -39,14 +40,8 @@ client.registry
|
|||||||
client.on('ready', () => {
|
client.on('ready', () => {
|
||||||
console.log(`[READY] Logged in as ${client.user.tag}! (${client.user.id})`);
|
console.log(`[READY] Logged in as ${client.user.tag}! (${client.user.id})`);
|
||||||
client.setInterval(() => {
|
client.setInterval(() => {
|
||||||
const activities = [
|
const activity = activities[Math.floor(Math.random() * activities.length)];
|
||||||
`${XIAO_COMMAND_PREFIX}help for commands`,
|
client.user.setActivity(activity.text, { type: activity.type });
|
||||||
'with dragonfire535',
|
|
||||||
client.options.invite,
|
|
||||||
`with ${client.registry.commands.size} commands`,
|
|
||||||
'Rune Factory 4'
|
|
||||||
];
|
|
||||||
client.user.setActivity(activities[Math.floor(Math.random() * activities.length)]);
|
|
||||||
}, 60000);
|
}, 60000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"text": "Rune Factory 4",
|
||||||
|
"type": "PLAYING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "dragonfire535 code",
|
||||||
|
"type": "WATCHING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "your voice",
|
||||||
|
"type": "LISTENING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "with your heart",
|
||||||
|
"type": "PLAYING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "you",
|
||||||
|
"type": "WATCHING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "over your server",
|
||||||
|
"type": "WATCHING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "you chat",
|
||||||
|
"type": "WATCHING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "with dragonfire535",
|
||||||
|
"type": "PLAYING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "with a Wumpus",
|
||||||
|
"type": "PLAYING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Travelers of the Wind",
|
||||||
|
"type": "LISTENING"
|
||||||
|
}
|
||||||
|
]
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "54.2.0",
|
"version": "54.2.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "XiaoBot.js",
|
"main": "XiaoBot.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user