added embed for /hilfe
This commit is contained in:
22
src/actions/help/help.components.ts
Normal file
22
src/actions/help/help.components.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Commands, CommandsMeta } from 'commands';
|
||||
import { AttachmentBuilder, EmbedBuilder } from 'discord.js';
|
||||
|
||||
export default function createEmbed() { // ({ embeds: [exampleEmbed] })
|
||||
console.log("createEmbed()");
|
||||
|
||||
const exampleEmbed = new EmbedBuilder()
|
||||
.setColor(0x004400)
|
||||
//.setTitle("/hilfe")
|
||||
//.setURL("")
|
||||
.setAuthor({ name: "avocadi - befehle", iconURL: "https://media.discordapp.net/attachments/1321933410188656693/1323447010380222474/mo_Avocadi_Avatar_Closeup_2.png?ex=67748b93&is=67733a13&hm=f48efb3523bca5f50e79144c7b41a127c94670e693e3da3dc2e6ffe62ad8a769&=&format=webp&quality=lossless&width=1524&height=1524", url: 'https://git.unom.io/moriese/avocadi-bot' })
|
||||
.setDescription(" ")
|
||||
.addFields(
|
||||
{ name: "/" + Commands.Enum.giessen, value: CommandsMeta.giessen.description },
|
||||
{ name: "/" + Commands.Enum.medikamente, value: CommandsMeta.medikamente.description },
|
||||
{ name: "/" + Commands.Enum.hilfe, value: CommandsMeta.hilfe.description },
|
||||
)
|
||||
.setTimestamp()
|
||||
//.setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/AfFp7pu.png' });
|
||||
;
|
||||
return exampleEmbed;
|
||||
}
|
||||
20
src/actions/help/help.service.ts
Normal file
20
src/actions/help/help.service.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { CacheType, Interaction } from "discord.js";
|
||||
import createEmbed from "./help.components";
|
||||
|
||||
export class HelpService {
|
||||
exampleEmbed: any;
|
||||
|
||||
constructor() {
|
||||
this.exampleEmbed = createEmbed();
|
||||
}
|
||||
|
||||
async handleInteraction(interaction: Interaction<CacheType>) {
|
||||
console.log("help");
|
||||
|
||||
if (interaction.isChatInputCommand()) {
|
||||
await interaction.reply({
|
||||
embeds: [this.exampleEmbed],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user