respond with command list when @mentioned

This commit is contained in:
GooeyTuxedo
2023-04-18 14:47:06 -07:00
parent 6036aea919
commit bfaa6ebd25
5 changed files with 44 additions and 18 deletions

24
src/events/message.ts Normal file
View File

@ -0,0 +1,24 @@
import 'dotenv/config.js';
import { Events, Message, EmbedBuilder, User } from "discord.js";
import { DiscordClient } from '../discordClient';
module.exports = {
name: Events.MessageCreate,
async execute(client: DiscordClient, message: Message) {
if (message.author.bot) return;
if (message.mentions.has(client.user as User)) {
const embeds = [
new EmbedBuilder()
.setColor('#008000')
.setTitle('Available slash commands')
.setDescription(
`/gas
/alert [GWEI]
/alert-delete
/pending-alert`
)
]
message.reply({embeds});
}
}
};