custom message added
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
import config from "config";
|
||||
|
||||
export const greetContent = ["HALLOOOO", "guten morgen! ich hoffe es geht euch gut <3"];
|
||||
export const sleepContent = ["gute nacht! ich muss jetzt schlafen gehen :c", "zzzzZZ..", "*schnarch*"];
|
||||
export const customContent = `hey <@&${config.discord.mentionStudy}>! meine [eigene website](https://avocadi.unom.io) ist endlich on :3\ngebe mir gerne rueckmeldung unter <#${config.discord.channelIdFeedback}>! <3`;
|
||||
@@ -1,7 +1,8 @@
|
||||
import config from "config";
|
||||
import client from "lib/client";
|
||||
import { getRandomInt } from "lib/utils";
|
||||
import { greetContent, sleepContent } from "./greeting.components.ts";
|
||||
import { customContent, greetContent, sleepContent } from "./greeting.components.ts";
|
||||
import { EmbedBuilder } from "discord.js";
|
||||
|
||||
export class GreetingService {
|
||||
async customMessage() {
|
||||
@@ -9,13 +10,26 @@ export class GreetingService {
|
||||
|
||||
const channels = client.channels;
|
||||
|
||||
const channel = channels.cache.get(config.discord.channelId);
|
||||
const channel = channels.cache.get(config.discord.channelIdBot);
|
||||
|
||||
if (channel?.isTextBased && channel?.isSendable()) {
|
||||
await channel.send({ content: " " });
|
||||
await channel.send({ embeds: [this.createEmbed()], });
|
||||
}
|
||||
}
|
||||
|
||||
createEmbed() { // ({ embeds: [exampleEmbed] })
|
||||
console.log("createEmbed()");
|
||||
|
||||
const exampleEmbed = new EmbedBuilder()
|
||||
.setColor(0x004400)
|
||||
.setAuthor({ name: "avocadi - neuigkeiten", 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://avocadi.unom.io' })
|
||||
.setDescription(customContent)
|
||||
.setTimestamp()
|
||||
//.setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/AfFp7pu.png' });
|
||||
;
|
||||
return exampleEmbed;
|
||||
}
|
||||
|
||||
async greet() {
|
||||
client.user?.setActivity("guten morgen! :3", { type: 4 });
|
||||
console.log("set activity: awake");
|
||||
@@ -25,7 +39,7 @@ export class GreetingService {
|
||||
|
||||
const channels = client.channels;
|
||||
|
||||
const channel = channels.cache.get(config.discord.channelId);
|
||||
const channel = channels.cache.get(config.discord.testChannel);
|
||||
|
||||
if (channel?.isTextBased && channel?.isSendable()) {
|
||||
await channel.send({ content: this.getContent(false) });
|
||||
@@ -41,7 +55,7 @@ export class GreetingService {
|
||||
|
||||
const channels = client.channels;
|
||||
|
||||
const channel = channels.cache.get(config.discord.channelId);
|
||||
const channel = channels.cache.get(config.discord.testChannel);
|
||||
|
||||
if (channel?.isTextBased && channel?.isSendable()) {
|
||||
await channel.send({ content: this.getContent(true) });
|
||||
|
||||
@@ -11,9 +11,9 @@ export default function createEmbed() { // ({ embeds: [exampleEmbed] })
|
||||
.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 },
|
||||
{ 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' });
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { CacheType, Interaction } from "discord.js";
|
||||
import createEmbed from "./help.components";
|
||||
|
||||
export class HelpService {
|
||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||
exampleEmbed: any;
|
||||
|
||||
constructor() {
|
||||
|
||||
Reference in New Issue
Block a user