feat: build out discord support agent
All checks were successful
Node.js CI / Lint and Test (pull_request) Successful in 1m17s

This commit is contained in:
2025-07-05 23:06:45 -07:00
parent af33e704a4
commit cd5c3761f4
33 changed files with 1300 additions and 0 deletions

35
bot/prod/commands/dm.js Normal file
View File

@ -0,0 +1,35 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { errorHandler } from "../utils/errorHandler.js";
/**
* Handles the `/dm` command interaction.
* @param _hikari - Hikari's Discord instance (unused).
* @param interaction - The command interaction payload from Discord.
*/
export const dm = async (_hikari, interaction) => {
try {
await interaction.deferReply({
ephemeral: true,
});
const dmSent = await interaction.user.send({
content: "Hello! You can now ask me questions directly in this DM channel.",
});
await dmSent.delete();
await interaction.editReply({
content:
// eslint-disable-next-line stylistic/max-len -- Big boi string.
"I have highlighted your DM channel. You can now ask me questions directly there!",
});
}
catch (error) {
await errorHandler(error, "dm command");
await interaction.editReply({
content:
// eslint-disable-next-line stylistic/max-len -- Big boi string.
"Oh dear! It looks like I might not be able to DM you. You may need to install me directly to your user account!",
});
}
};