generated from nhcarrigan/template
This commit is contained in:
+20
-2
@@ -4,9 +4,14 @@
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { Client, GatewayIntentBits, Events, Partials } from "discord.js";
|
||||
import { Client,
|
||||
GatewayIntentBits,
|
||||
Events,
|
||||
Partials,
|
||||
MessageFlags } from "discord.js";
|
||||
import { scheduleJob } from "node-schedule";
|
||||
import { App } from "octokit";
|
||||
import { ids } from "./config/ids.js";
|
||||
import { handleMessageCreate } from "./events/handleMessageCreate.js";
|
||||
import { cacheData } from "./modules/cacheData.js";
|
||||
import {
|
||||
@@ -72,8 +77,21 @@ amari.discord.on(Events.MessageCreate, (message) => {
|
||||
|
||||
amari.discord.on(Events.InteractionCreate, (interaction) => {
|
||||
if (interaction.isButton() && interaction.customId === "resolve") {
|
||||
void interaction.message.delete();
|
||||
if (interaction.user.id !== ids.users.naomi) {
|
||||
return void interaction.reply(
|
||||
{ content: "Who are you????",
|
||||
flags: [ MessageFlags.Ephemeral ] },
|
||||
);
|
||||
}
|
||||
return void interaction.message.delete();
|
||||
}
|
||||
if (interaction.isAutocomplete()) {
|
||||
return void interaction;
|
||||
}
|
||||
return void interaction.reply({
|
||||
content: "What?",
|
||||
flags: [ MessageFlags.Ephemeral ],
|
||||
});
|
||||
});
|
||||
|
||||
amari.discord.on(Events.UserUpdate, (_oldUser, updatedUser) => {
|
||||
|
||||
Reference in New Issue
Block a user