hullcss-discord-bot/events/ready.js

31 lines
1.7 KiB
JavaScript

const client = require("../index");
const discord = require("discord.js")
client.on('ready', () => {
console.log('HullCSS is online')
client.user.setActivity(`-help | hullcss.org` , {type:"WATCHING"})
const guild = client.guilds.cache.get('969944638498680872')
setInterval(() =>{
const memberCount = client.guilds.cache.get('969944638498680872').memberCount
const channel = client.channels.cache.get('969944638981034014');
channel.setName(`Discord Members: ${memberCount.toLocaleString()}`);
}, 600000);
const courseworkhelpchannel = client.channels.cache.get('970027557607071754')
setInterval(() =>{
const embed = new discord.MessageEmbed()
.setColor('GREEN')
.setFooter(`Sent every 24 hours`)
.setTimestamp()
.setTitle("Reminder")
.setDescription(`As a reminder that this is a community help channel. Here are some rules to follow before using this channel.`)
.addField('Code Rules', 'Please keep all code relevevant and short to prevent getting too much help. This channel is to get help with coursework, not for members to do it for you.')
.addField('Code Sharing', 'For shorter pieces of code please use discord in built code blocks. For larger pieces, please use a thid party code sharing site.')
.addField('Canvas', 'The best place to get help will always be by asking the lecturer. By using the Canvas discussion forum, this means that you will get direct help from the module team and others studying the module.')
.addField('Pingable Role', 'There is a pingable role for you to ping helpful people. Please don`t overuse it.')
courseworkhelpchannel.send({ embeds: [embed] });
}, 86400000);
})