zbytečnost
This commit is contained in:
parent
fda8571cbe
commit
52900c0e94
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user