From a7b579a9ac2ee45f0feea55b57a64ad36addc41c Mon Sep 17 00:00:00 2001 From: wonderlandpark Date: Fri, 12 Mar 2021 13:17:20 +0900 Subject: [PATCH] feat: added get report channel function --- utils/DiscordBot.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/DiscordBot.ts b/utils/DiscordBot.ts index 34c6cf6..9db4b66 100644 --- a/utils/DiscordBot.ts +++ b/utils/DiscordBot.ts @@ -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 }