diff --git a/src/commands/admin/init.ts b/src/commands/admin/init.ts index 42dc080..adba8ab 100644 --- a/src/commands/admin/init.ts +++ b/src/commands/admin/init.ts @@ -4,15 +4,18 @@ import config from "../../config"; // ---------- @SlashCommand( - new CommandBuilder('init', 'Configure bot & settings.') + new CommandBuilder('init', 'Runs pre-start operations, then starts the bot for operation.') .setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall) .setContexts(Constants.InteractionContextType.Guild) .setCommandType(Constants.ApplicationCommandType.ChatInput) ) class InitCommand extends Command { - users = ['1363132678022631428']; + users = [ + '1363132678022631428', // nxbat + '454653142500507649' // bitdash + ]; - async handleCommand(context: CommandClient, interaction: CommandInteraction) { + async #createInformationMessage(context: CommandClient, interaction: CommandInteraction) { await context.createMessage(interaction.channel.id, { embed: { color: 0xe77ed1, @@ -37,7 +40,10 @@ class InitCommand extends Command { } } }); + } + async handleCommand(context: CommandClient, interaction: CommandInteraction) { + for (const handler of [this.#createInformationMessage]) await handler(context, interaction); await interaction.createMessage({ content: 'Done.', flags: Constants.MessageFlags.Ephemeral }); } } diff --git a/src/commands/index.ts b/src/commands/index.ts index 3f25e44..f858218 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -1,9 +1,10 @@ import init from "./admin/init"; -import wipe from "./admin/wipe"; +import prune from "./admin/prune"; +import leaderboard from "./leaderboard"; import optin from "./privacy/optin"; import optout from "./privacy/optout"; import profile from "./profile"; // ---------- -export default [init, optin, optout, profile, wipe]; +export default [init, leaderboard, optin, optout, profile, prune]; diff --git a/src/index.ts b/src/index.ts index 33769e0..24a3e3b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,6 @@ const client: CommandClient = new CommandClient({ options: { intents: [ Constants.GatewayIntentBits.Guilds, - Constants.GatewayIntentBits.GuildMembers, Constants.GatewayIntentBits.GuildMessages, Constants.GatewayIntentBits.GuildMessageReactions ], diff --git a/src/utils/database.ts b/src/utils/database.ts index 374224a..e5066d5 100644 --- a/src/utils/database.ts +++ b/src/utils/database.ts @@ -32,8 +32,6 @@ export async function getUser(userId: string): Promise { DO NOTHING RETURNING user_id, data `; - - } export async function setUser(userId: string, data: User): Promise {