Add guild add notif
This commit is contained in:
parent
e05bd20f1f
commit
4144dde4d6
10
main.js
10
main.js
@ -26,6 +26,7 @@ const fn = require('./modules/functions.js');
|
|||||||
const strings = require('./data/strings.json');
|
const strings = require('./data/strings.json');
|
||||||
const dbfn = require('./modules/dbfn.js');
|
const dbfn = require('./modules/dbfn.js');
|
||||||
const isDev = process.env.DEBUG;
|
const isDev = process.env.DEBUG;
|
||||||
|
let statusChannel;
|
||||||
|
|
||||||
client.once('ready', async () => {
|
client.once('ready', async () => {
|
||||||
fn.collectionBuilders.slashCommands(client);
|
fn.collectionBuilders.slashCommands(client);
|
||||||
@ -37,10 +38,9 @@ client.once('ready', async () => {
|
|||||||
// checkRateLimits();
|
// checkRateLimits();
|
||||||
console.log('Ready!');
|
console.log('Ready!');
|
||||||
client.user.setActivity({ name: `${serverCount} trees grow.`, type: ActivityType.Watching });
|
client.user.setActivity({ name: `${serverCount} trees grow.`, type: ActivityType.Watching });
|
||||||
|
statusChannel = await client.channels.fetch(statusChannelId);
|
||||||
if (isDev == 'false') {
|
if (isDev == 'false') {
|
||||||
client.channels.fetch(statusChannelId).then(channel => {
|
statusChannel.send(`${new Date().toISOString()} -- \nStartup Sequence Complete <@481933290912350209>`);
|
||||||
channel.send(`${new Date().toISOString()} -- \nStartup Sequence Complete <@481933290912350209>`);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -124,6 +124,10 @@ client.on('messageCreate', async message => {
|
|||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
client.on('guildCreate', async guild => {
|
||||||
|
await statusChannel.send(`I've been added to a new guild: ${guild.name} (${guild.id})`);
|
||||||
|
});
|
||||||
|
|
||||||
async function checkRateLimits(hi) {
|
async function checkRateLimits(hi) {
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user