This commit is contained in:
2025-01-06 15:17:51 +01:00
parent 94d2fc40e6
commit 78a65511c2
4 changed files with 17 additions and 1 deletions

View File

@@ -41,7 +41,19 @@ export class DmService {
const context = `<@${message.author.id}> hat geschrieben: " ${message.content} "`;
console.log(context);
client.users.send(config.discord.myId, context);
try {
const channels = client.channels;
const channel = channels.cache.get(config.discord.channelIdNotification);
if (channel?.isTextBased() && channel?.isSendable()) {
await channel.send(context);
}
} catch (error) {
console.error("error while forwarding a welcome msg:", error);
}
//client.users.send(config.discord.myId, context);
}
async acceptDm(member: GuildMember) {