mirror of
https://github.com/nx-bat/pet-the-pond.git
synced 2026-09-22 10:29:11 -04:00
stuff.
This commit is contained in:
@@ -4,15 +4,18 @@ import config from "../../config";
|
|||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
@SlashCommand(
|
@SlashCommand(
|
||||||
new CommandBuilder('init', 'Configure bot & settings.')
|
new CommandBuilder('init', 'Runs pre-start operations, then starts the bot for operation.')
|
||||||
.setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall)
|
.setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall)
|
||||||
.setContexts(Constants.InteractionContextType.Guild)
|
.setContexts(Constants.InteractionContextType.Guild)
|
||||||
.setCommandType(Constants.ApplicationCommandType.ChatInput)
|
.setCommandType(Constants.ApplicationCommandType.ChatInput)
|
||||||
)
|
)
|
||||||
class InitCommand extends Command<CommandClient> {
|
class InitCommand extends Command<CommandClient> {
|
||||||
users = ['1363132678022631428'];
|
users = [
|
||||||
|
'1363132678022631428', // nxbat
|
||||||
|
'454653142500507649' // bitdash
|
||||||
|
];
|
||||||
|
|
||||||
async handleCommand(context: CommandClient<any, any>, interaction: CommandInteraction) {
|
async #createInformationMessage(context: CommandClient<any, any>, interaction: CommandInteraction) {
|
||||||
await context.createMessage(interaction.channel.id, {
|
await context.createMessage(interaction.channel.id, {
|
||||||
embed: {
|
embed: {
|
||||||
color: 0xe77ed1,
|
color: 0xe77ed1,
|
||||||
@@ -37,7 +40,10 @@ class InitCommand extends Command<CommandClient> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async handleCommand(context: CommandClient<any, any>, interaction: CommandInteraction) {
|
||||||
|
for (const handler of [this.#createInformationMessage]) await handler(context, interaction);
|
||||||
await interaction.createMessage({ content: 'Done.', flags: Constants.MessageFlags.Ephemeral });
|
await interaction.createMessage({ content: 'Done.', flags: Constants.MessageFlags.Ephemeral });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import init from "./admin/init";
|
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 optin from "./privacy/optin";
|
||||||
import optout from "./privacy/optout";
|
import optout from "./privacy/optout";
|
||||||
import profile from "./profile";
|
import profile from "./profile";
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
export default [init, optin, optout, profile, wipe];
|
export default [init, leaderboard, optin, optout, profile, prune];
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ const client: CommandClient = new CommandClient({
|
|||||||
options: {
|
options: {
|
||||||
intents: [
|
intents: [
|
||||||
Constants.GatewayIntentBits.Guilds,
|
Constants.GatewayIntentBits.Guilds,
|
||||||
Constants.GatewayIntentBits.GuildMembers,
|
|
||||||
Constants.GatewayIntentBits.GuildMessages,
|
Constants.GatewayIntentBits.GuildMessages,
|
||||||
Constants.GatewayIntentBits.GuildMessageReactions
|
Constants.GatewayIntentBits.GuildMessageReactions
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ export async function getUser(userId: string): Promise<User> {
|
|||||||
DO NOTHING
|
DO NOTHING
|
||||||
RETURNING user_id, data
|
RETURNING user_id, data
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setUser(userId: string, data: User): Promise<void> {
|
export async function setUser(userId: string, data: User): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user