mirror of
https://github.com/nx-bat/pet-the-pond.git
synced 2026-09-22 02:19:10 -04:00
stuff.
This commit is contained in:
@@ -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<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, {
|
||||
embed: {
|
||||
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 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -12,7 +12,6 @@ const client: CommandClient = new CommandClient({
|
||||
options: {
|
||||
intents: [
|
||||
Constants.GatewayIntentBits.Guilds,
|
||||
Constants.GatewayIntentBits.GuildMembers,
|
||||
Constants.GatewayIntentBits.GuildMessages,
|
||||
Constants.GatewayIntentBits.GuildMessageReactions
|
||||
],
|
||||
|
||||
@@ -32,8 +32,6 @@ export async function getUser(userId: string): Promise<User> {
|
||||
DO NOTHING
|
||||
RETURNING user_id, data
|
||||
`;
|
||||
|
||||
|
||||
}
|
||||
|
||||
export async function setUser(userId: string, data: User): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user