You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Natsuki/bot.js

31 lines
1.3 KiB

const Discord = require('discord.js');
const auth = require('./src/json/auth.json');
const config = require('./src/json/config.json');
2 years ago
const randresp = require('./src/json/randresp.json');
2 years ago
const log = require('./src/util/log/log');
2 years ago
const flags = Discord.GatewayIntentBits;
const partials = Discord.Partials;
let fl = []; Object.keys(flags).forEach(flag => fl.push(flags[flag])); // fuck new standards i'm in't'zing with all the flags.
2 years ago
const client = new Discord.Client({intents: fl, partials: [partials.Channel, partials.Message, partials.Reaction]});
// a "fuck v14" counter is gonna be here real soon i can feel it.
const startBot = async () => {
client.config = config;
client.auth = auth;
2 years ago
client.config.randResp = randresp;
require('./src/util/misc/setutils')(client); // add some basic swiss army knife utils
const loggers = log(client);
Object.keys(loggers).forEach(logger => client[logger] = loggers[logger]);
2 years ago
client.log(client.utils.gr(client.config.randResp.clistart), {color: "#78d9f8", source: "NATS"}, true); //natsuki's wakeup log
2 years ago
};
startBot();
2 years ago
// feels like there isn't a function name to do this justice :joy:
// to do list:
// TODO check log files later for cleanup, config, and util optimization
// TODO check connect file later for ^