generated from nhcarrigan/template
This commit is contained in:
+9
-1
@@ -4,7 +4,8 @@
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { Client, GatewayIntentBits, Events } from "discord.js";
|
||||
import { Client, GatewayIntentBits, Events, MessageFlags } from "discord.js";
|
||||
import { blocks } from "./config/blocks.js";
|
||||
import { checkAltText } from "./modules/checkAltText.js";
|
||||
import { instantiateServer } from "./server/serve.js";
|
||||
import { logger } from "./utils/logger.js";
|
||||
@@ -25,5 +26,12 @@ client.on(Events.MessageCreate, (message) => {
|
||||
void checkAltText(message);
|
||||
});
|
||||
|
||||
client.on(Events.InteractionCreate, (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) {
|
||||
return;
|
||||
}
|
||||
void interaction.reply({ components: blocks, flags: MessageFlags.IsComponentsV2 });
|
||||
})
|
||||
|
||||
await client.login(process.env.BOT_TOKEN);
|
||||
instantiateServer();
|
||||
|
||||
Reference in New Issue
Block a user