|
|
@@ -5,7 +5,7 @@ import {ForumChannel} from 'discord.js'; |
|
|
|
import {setupThreads} from './modules/thread'; |
|
|
|
import {BotContext} from './common'; |
|
|
|
|
|
|
|
const main = async (channelId: string) => { |
|
|
|
const main = async () => { |
|
|
|
const client = createClient({ |
|
|
|
intents: config.meta.intentsInteger, |
|
|
|
}); |
|
|
@@ -28,9 +28,9 @@ const main = async (channelId: string) => { |
|
|
|
} |
|
|
|
console.log(`Logged in as ${client.user.tag}`); |
|
|
|
|
|
|
|
const channel = await client.channels.fetch(channelId); |
|
|
|
const channel = await client.channels.fetch(config.meta.channelId); |
|
|
|
if (!(channel instanceof ForumChannel)) { |
|
|
|
console.error(`Channel ${channelId} is not a forum!`); |
|
|
|
console.error(`Channel ${config.meta.channelId} is not a forum!`); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
@@ -43,4 +43,5 @@ const main = async (channelId: string) => { |
|
|
|
} |
|
|
|
|
|
|
|
// TODO load channelId from config |
|
|
|
void main('1244285168580300904'); |
|
|
|
// TODO add discord wizard for chatting with bot for setup (e.g. selecting forum channel ID) |
|
|
|
void main(); |