SweeperBot/mod.ts

30 lines
722 B
TypeScript
Raw Normal View History

2022-09-01 21:53:43 -07:00
/* The Artificer was built in memory of Babka
* With love, Ean
*
* December 21, 2020
*/
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 { dbClient, ignoreList } from './src/db.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-01 23:48:28 -07:00
intents: Intents.MessageContent | Intents.GuildMessages | Intents.DirectMessages | Intents.Guilds,
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);