respond with command list when @mentioned
This commit is contained in:
24
src/events/message.ts
Normal file
24
src/events/message.ts
Normal 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});
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user