1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-16 20:00:59 -05:00

Use ??= instead of ternary operator

This commit is contained in:
toast-ts 2024-03-05 11:21:08 +11:00
parent 53a91a0bcb
commit 9416f00f4a

View File

@ -13,7 +13,7 @@ export default class ChannelUpdate {
if (auditChupdate.changes.length > 0) {
const changes = auditChupdate.changes;
const formatAudit =(auditValue:Discord.AuditLogChange)=>`${auditValue.old === undefined ? 'None' : auditValue.old}${auditValue.new === '' ? 'None' : auditValue.new}`;
const formatAudit =(auditValue:Discord.AuditLogChange)=>`${auditValue.old ??= 'None'}${auditValue.new ??= 'None'}`;
embed.setTitle(`\`${oldChannel.name}\` was updated`).setTimestamp(auditChupdate.createdTimestamp);
for (const change of changes) {