zbytečnost

This commit is contained in:
Histmy 2023-11-18 11:24:24 +01:00
parent fda8571cbe
commit 52900c0e94

View File

@ -72,11 +72,11 @@ export function adminLog(client: Client, text: string, err?: string | Error) {
if (process.env.adminChannel) { if (process.env.adminChannel) {
const adminChannel = client.channels.cache.get(process.env.adminChannel); const adminChannel = client.channels.cache.get(process.env.adminChannel);
if (adminChannel?.type == ChannelType.GuildText) if (adminChannel?.type == ChannelType.GuildText)
adminChannel.send(!!err ? `${text}\n\`\`\`${err}\`\`\`` : text); adminChannel.send(err ? `${text}\n\`\`\`${err}\`\`\`` : text);
} }
if (process.env.adminID) { if (process.env.adminID) {
const user = client.users.cache.get(process.env.adminID); const user = client.users.cache.get(process.env.adminID);
if (user) sendDM(user, !!err ? `${text}\n\`\`\`${err}\`\`\`` : text); if (user) sendDM(user, err ? `${text}\n\`\`\`${err}\`\`\`` : text);
} }
} }