Skip to content

Commit

Permalink
stop reply mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
daniwasonline committed May 17, 2024
1 parent 05b565b commit 3d95088
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
import process from 'node:process';
import { URL } from 'node:url';
import { Client, GatewayIntentBits } from 'discord.js';
import { cmdRollout } from './util/deploy.js';
import { loadCommands, loadEvents } from './util/loaders.js';
import { registerEvents } from './util/registerEvents.js';
import chalk from 'chalk';
import process from "node:process";
import { URL } from "node:url";
import { Client, GatewayIntentBits } from "discord.js";
import { cmdRollout } from "./util/deploy.js";
import { loadCommands, loadEvents } from "./util/loaders.js";
import { registerEvents } from "./util/registerEvents.js";
import chalk from "chalk";

// Instead of relying on Date directly, we're choosing to adopt the new Temporal standard (currently TC39).
// Why Temporal? See -> https://tc39.es/proposal-temporal/docs/
import 'temporal-polyfill/global';
import "temporal-polyfill/global";

(() => {
console.log(`${chalk.bold.green('Core')} running with environment context: ${chalk.bold(process.env.NODE_ENV)}`);
console.log(`${chalk.bold.magenta('AI')} running with LLM preset: ${chalk.bold(process.env.MODEL_LLM_PRESET)}`);
console.log(`${chalk.bold.green("Core")} running with environment context: ${chalk.bold(process.env.NODE_ENV)}`);
console.log(`${chalk.bold.magenta("AI")} running with LLM preset: ${chalk.bold(process.env.MODEL_LLM_PRESET)}`);
})();

// Initialize the client
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages],
allowedMentions: { parse: [], repliedUser: false },
});

// Deploy commands
await cmdRollout();

// Load the events and commands
const events = await loadEvents(new URL('events/', import.meta.url));
const commands = await loadCommands(new URL('commands/', import.meta.url));
const events = await loadEvents(new URL("events/", import.meta.url));
const commands = await loadCommands(new URL("commands/", import.meta.url));

// Register the event handlers
registerEvents(commands, events, client);
Expand Down

0 comments on commit 3d95088

Please sign in to comment.