Skip to content

Commit fcf39a6

Browse files
committed
🧹 chore: add logging for target ID and message author ID in handleDeleteMessages function
1 parent dd54101 commit fcf39a6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎src/commands/moderation/repel.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,23 @@ const handleDeleteMessages = async ({
144144
lookBack: number;
145145
}) => {
146146
let deleted = 0;
147+
console.log({ '😭 targetId': target.id });
147148
const failedChannels: string[] = [];
148149
await Promise.allSettled(
149150
channels.map(async (channel) => {
150151
try {
151152
const messages = channel.messages.cache;
152153
const targetMessages = messages
153-
.filter(
154-
(message) =>
154+
.filter((message) => {
155+
console.log({
156+
'😭 message author id': message.author.id,
157+
});
158+
return (
155159
message.author.id === target.id &&
156160
message.deletable &&
157161
Date.now() - message.createdTimestamp < lookBack
158-
)
162+
);
163+
})
159164
.first(10);
160165

161166
if (targetMessages.length === 0) {

0 commit comments

Comments
 (0)