SweeperBot/mod.ts

23 lines
606 B
TypeScript
Raw Normal View History

2022-09-01 21:53:43 -07:00
import config from './config.ts';
2022-09-01 23:48:28 -07:00
import { DEBUG, LOCALMODE } from './flags.ts';
2022-09-01 21:53:43 -07:00
import {
// Discordeno deps
2022-09-02 22:26:31 -07:00
createBot,
2022-09-01 21:53:43 -07:00
initLog,
Intents,
startBot,
} from './deps.ts';
import { events } from './src/events.ts';
2022-09-01 21:53:43 -07:00
// Initialize logging client with folder to use for logs, needs --allow-write set on Deno startup
initLog('logs', DEBUG);
// Start up the Discord Bot
2022-09-01 23:48:28 -07:00
const bot = createBot({
2022-09-01 21:53:43 -07:00
token: LOCALMODE ? config.localtoken : config.token,
2022-09-04 15:23:21 -07:00
intents: Intents.MessageContent | Intents.GuildMessages | Intents.DirectMessages | Intents.Guilds | Intents.GuildMessageReactions,
2022-09-01 23:48:28 -07:00
events,
2022-09-01 21:53:43 -07:00
});
2022-09-01 23:48:28 -07:00
2022-09-02 22:26:31 -07:00
startBot(bot);