summaryrefslogtreecommitdiff
path: root/packages/gateway/src/commands/pin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gateway/src/commands/pin.ts')
-rw-r--r--packages/gateway/src/commands/pin.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/gateway/src/commands/pin.ts b/packages/gateway/src/commands/pin.ts
index 86f24be..884e41b 100644
--- a/packages/gateway/src/commands/pin.ts
+++ b/packages/gateway/src/commands/pin.ts
@@ -1,5 +1,5 @@
import { Message } from "discord.js";
-import { replyWithCleanup } from "../utilities";
+import { logUnexpectedDiscordAPIError, replyWithCleanup } from "../utilities";
export const handlePinCommand = async (message: Message) => {
if (message.author.bot) return;
@@ -97,7 +97,7 @@ export const handlePinCommand = async (message: Message) => {
});
}
} catch (error) {
- console.error(`Error processing message ${messageId}:`, error);
+ logUnexpectedDiscordAPIError(error);
results.push({
success: false,
messageId,
@@ -129,12 +129,12 @@ export const handlePinCommand = async (message: Message) => {
try {
await replyMessage.delete();
} catch (error) {
- console.error("Failed to delete result message:", error);
+ logUnexpectedDiscordAPIError(error);
}
}, 10000);
}
} catch (error) {
- console.error("Error pinning message:", error);
+ logUnexpectedDiscordAPIError(error);
if (
error instanceof Error &&