Random status
This commit is contained in:
parent
83ec5aec7a
commit
4b13b17388
|
@ -2,4 +2,5 @@ utils/tmp/
|
|||
node_modules/
|
||||
cookies.txt
|
||||
config.json
|
||||
package-lock.json
|
||||
package-lock.json
|
||||
statuses.json
|
13
index.js
13
index.js
|
@ -44,7 +44,18 @@ for (const file of commandFiles) {
|
|||
|
||||
client.once('ready', () => {
|
||||
console.log(`Logged in as ${client.user.tag}!`);
|
||||
client.user.setActivity('DZ Politics', { type: 'LISTENING' });
|
||||
client.user.setStatus('idle');
|
||||
|
||||
const statuses = require('./statuses.json');
|
||||
|
||||
function updateStatus() {
|
||||
const randomStatus = statuses[Math.floor(Math.random() * statuses.length)];
|
||||
client.user.setActivity(randomStatus);
|
||||
console.log(`Activity set to: ${randomStatus}`);
|
||||
}
|
||||
|
||||
updateStatus();
|
||||
setInterval(updateStatus, 30000);
|
||||
});
|
||||
|
||||
client.on('messageCreate', async message => {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
"Status 1",
|
||||
"Status 2"
|
||||
]
|
Loading…
Reference in New Issue