Rich Presence

This commit is contained in:
Daniel Odendahl Jr
2017-11-12 18:21:26 +00:00
parent 719acea235
commit d15f22893a
3 changed files with 46 additions and 9 deletions
+3 -8
View File
@@ -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);
});
+42
View File
@@ -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
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "54.2.0",
"version": "54.2.1",
"description": "Your personal server companion.",
"main": "XiaoBot.js",
"scripts": {