Added Basic Fact of the Day Feature

This commit is contained in:
Ahmad 2025-03-08 00:29:19 -05:00
parent 2139f2efa0
commit 40942e2539
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
9 changed files with 544 additions and 27 deletions

View file

@ -5,6 +5,7 @@ import {
ActionRowBuilder,
GuildChannel,
} from 'discord.js';
import {
LogActionPayload,
ModerationLogAction,
@ -22,10 +23,12 @@ import {
getPermissionDifference,
getPermissionNames,
} from './utils.js';
import { loadConfig } from '../configLoader.js';
export default async function logAction(payload: LogActionPayload) {
const logChannel = payload.guild.channels.cache.get('1007787977432383611');
if (!logChannel || !(logChannel instanceof TextChannel)) {
const config = loadConfig();
const logChannel = payload.guild.channels.cache.get(config.channels.logs);
if (!logChannel?.isTextBased()) {
console.error('Log channel not found or is not a Text Channel.');
return;
}