Set presence on bot startup
This commit is contained in:
parent
edbf942051
commit
0d5502bc92
1 changed files with 7 additions and 2 deletions
|
@ -11,7 +11,9 @@ const {
|
||||||
loginMessage,
|
loginMessage,
|
||||||
loginChannel,
|
loginChannel,
|
||||||
enableLoginMessage,
|
enableLoginMessage,
|
||||||
owners
|
owners,
|
||||||
|
presenceText,
|
||||||
|
presenceType
|
||||||
} = require('./data/config.json');
|
} = require('./data/config.json');
|
||||||
|
|
||||||
client.commands = new Discord.Collection();
|
client.commands = new Discord.Collection();
|
||||||
|
@ -27,7 +29,10 @@ loadNetModules(client)
|
||||||
|
|
||||||
client.once('ready', () => {
|
client.once('ready', () => {
|
||||||
console.log('Ready!');
|
console.log('Ready!');
|
||||||
client.user.setActivity(globalPrefix, { type: 'LISTENING' });
|
if(presenceType && presenceText)
|
||||||
|
client.user.setActivity(presenceText, { type: presenceType });
|
||||||
|
else
|
||||||
|
client.user.setActivity(globalPrefix, {type : "WATCHING"});
|
||||||
if (enableLoginMessage === true)
|
if (enableLoginMessage === true)
|
||||||
try{
|
try{
|
||||||
client.channels.cache.get(loginChannel).send(loginMessage)
|
client.channels.cache.get(loginChannel).send(loginMessage)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue