mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Rich Presence
This commit is contained in:
+3
-8
@@ -9,6 +9,7 @@ const client = new CommandoClient({
|
||||
unknownCommandResponse: false,
|
||||
disabledEvents: ['TYPING_START']
|
||||
});
|
||||
const activities = require('./assets/json/activity');
|
||||
|
||||
client.registry
|
||||
.registerDefaultTypes()
|
||||
@@ -39,14 +40,8 @@ client.registry
|
||||
client.on('ready', () => {
|
||||
console.log(`[READY] Logged in as ${client.user.tag}! (${client.user.id})`);
|
||||
client.setInterval(() => {
|
||||
const activities = [
|
||||
`${XIAO_COMMAND_PREFIX}help for commands`,
|
||||
'with dragonfire535',
|
||||
client.options.invite,
|
||||
`with ${client.registry.commands.size} commands`,
|
||||
'Rune Factory 4'
|
||||
];
|
||||
client.user.setActivity(activities[Math.floor(Math.random() * activities.length)]);
|
||||
const activity = activities[Math.floor(Math.random() * activities.length)];
|
||||
client.user.setActivity(activity.text, { type: activity.type });
|
||||
}, 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",
|
||||
"version": "54.2.0",
|
||||
"version": "54.2.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "XiaoBot.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user