feat: added get report channel function

This commit is contained in:
wonderlandpark 2021-03-12 13:17:20 +09:00
parent ce28be2641
commit a7b579a9ac

View File

@ -3,6 +3,8 @@ import * as Discord from 'discord.js'
const DiscordBot = new Discord.Client()
const guildID = '653083797763522580'
const reportChannelID = '813255797823766568'
DiscordBot.on('ready', async () => {
console.log('I\'m Ready')
await getMainGuild().members.fetch()
@ -12,4 +14,5 @@ DiscordBot.on('ready', async () => {
DiscordBot.login(process.env.DISCORD_TOKEN)
const getMainGuild = () => DiscordBot.guilds.cache.get(guildID)
export { DiscordBot, getMainGuild }
const getReportChannel = (): Discord.TextChannel => DiscordBot.channels.cache.get(reportChannelID) as Discord.TextChannel
export { DiscordBot, getMainGuild, getReportChannel }