mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 00:10:58 -05:00
Use ??= instead of ternary operator
This commit is contained in:
parent
53a91a0bcb
commit
9416f00f4a
@ -13,7 +13,7 @@ export default class ChannelUpdate {
|
|||||||
|
|
||||||
if (auditChupdate.changes.length > 0) {
|
if (auditChupdate.changes.length > 0) {
|
||||||
const changes = auditChupdate.changes;
|
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);
|
embed.setTitle(`\`${oldChannel.name}\` was updated`).setTimestamp(auditChupdate.createdTimestamp);
|
||||||
for (const change of changes) {
|
for (const change of changes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user