aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/track-manual-punishments
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-31 19:20:39 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-31 19:20:39 -0500
commitbab76f38a17c62f8c1477172fe1bc9428efb3843 (patch)
tree9aee5ed7b54e74735ff417820427c9d2efa984f4 /src/listeners/track-manual-punishments
parent78ab3362a52578d0bcada903732f147747c609df (diff)
downloadtanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.gz
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.bz2
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.zip
fixes, and breaking changes
Diffstat (limited to 'src/listeners/track-manual-punishments')
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncBan.ts6
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncKick.ts6
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncTimeout.ts6
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncUnban.ts6
4 files changed, 12 insertions, 12 deletions
diff --git a/src/listeners/track-manual-punishments/modlogSyncBan.ts b/src/listeners/track-manual-punishments/modlogSyncBan.ts
index b908231..6048235 100644
--- a/src/listeners/track-manual-punishments/modlogSyncBan.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncBan.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncBanListener extends BushListener {
public constructor() {
@@ -14,7 +14,7 @@ export default class ModlogSyncBanListener extends BushListener {
public override async exec(...[ban]: BushClientEvents['guildBanAdd']) {
if (!(await ban.guild.hasFeature('logManualPunishments'))) return;
if (!ban.guild.me) return; // bot was banned
- if (!ban.guild.me.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!ban.guild.me.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return ban.guild.error(
'modlogSyncBan',
`Could not sync the manual ban of ${ban.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -57,7 +57,7 @@ export default class ModlogSyncBanListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: ban.user.tag,
- iconURL: ban.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${'Manual Ban'}` })
.addField({ name: '**User**', value: `${ban.user} (${ban.user.tag})` })
diff --git a/src/listeners/track-manual-punishments/modlogSyncKick.ts b/src/listeners/track-manual-punishments/modlogSyncKick.ts
index 6bf661c..814b624 100644
--- a/src/listeners/track-manual-punishments/modlogSyncKick.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncKick.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncKickListener extends BushListener {
public constructor() {
@@ -14,7 +14,7 @@ export default class ModlogSyncKickListener extends BushListener {
public override async exec(...[member]: BushClientEvents['guildMemberRemove']) {
if (!(await member.guild.hasFeature('logManualPunishments'))) return;
if (!member.guild.me) return; // bot was removed from guild
- if (!member.guild.me.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!member.guild.me.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return member.guild.error(
'modlogSyncKick',
`Could not sync the potential manual kick of ${member.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -57,7 +57,7 @@ export default class ModlogSyncKickListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: member.user.tag,
- iconURL: member.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: member.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${'Manual Kick'}` })
.addField({ name: '**User**', value: `${member.user} (${member.user.tag})` })
diff --git a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
index fb48faa..1289f4c 100644
--- a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncTimeoutListener extends BushListener {
public constructor() {
@@ -13,7 +13,7 @@ export default class ModlogSyncTimeoutListener extends BushListener {
public override async exec(...[_oldMember, newMember]: BushClientEvents['guildMemberUpdate']) {
if (!(await newMember.guild.hasFeature('logManualPunishments'))) return;
- if (!newMember.guild.me!.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!newMember.guild.me!.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return newMember.guild.error(
'modlogSyncTimeout',
`Could not sync the potential manual timeout of ${newMember.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -62,7 +62,7 @@ export default class ModlogSyncTimeoutListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: newMember.user.tag,
- iconURL: newMember.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: newMember.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${newTime ? 'Manual Timeout' : 'Manual Remove Timeout'}` })
.addField({ name: '**User**', value: `${newMember.user} (${newMember.user.tag})` })
diff --git a/src/listeners/track-manual-punishments/modlogSyncUnban.ts b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
index e297fce..a92c1e9 100644
--- a/src/listeners/track-manual-punishments/modlogSyncUnban.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncUnbanListener extends BushListener {
public constructor() {
@@ -13,7 +13,7 @@ export default class ModlogSyncUnbanListener extends BushListener {
public override async exec(...[ban]: BushClientEvents['guildBanRemove']) {
if (!(await ban.guild.hasFeature('logManualPunishments'))) return;
- if (!ban.guild.me!.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!ban.guild.me!.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return ban.guild.error(
'modlogSyncBan',
`Could not sync the manual unban of ${ban.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -56,7 +56,7 @@ export default class ModlogSyncUnbanListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: ban.user.tag,
- iconURL: ban.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${'Manual Unban'}` })
.addField({ name: '**User**', value: `${ban.user} (${ban.user.tag})` })