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

Use ??= instead of ternary operator

This commit is contained in:
toast-ts 2024-03-05 11:21:08 +11:00
parent 8abe1dfaf2
commit 59ba9abccf

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) {