Skip to content

Commit 0314a8e

Browse files
committed
Log RESTEvents implicated by SequentialHandler
#647
1 parent 8050f19 commit 0314a8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/events/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, DiscordAPIError, RESTJSONErrorCodes } from "discord.js";
1+
import { Client, DiscordAPIError, RESTEvents, RESTJSONErrorCodes } from "discord.js";
22
import { CommandSupport } from "../Command";
33
import * as commands from "../commands";
44
import { Participant, RegisterMessage } from "../database/orm";
@@ -15,6 +15,8 @@ import * as messageDelete from "./messageDelete";
1515
const logger = getLogger("events");
1616

1717
export function registerEvents(bot: Client, prefix: string, support: CommandSupport): void {
18+
bot.on(RESTEvents.Debug, logger.verbose);
19+
bot.on(RESTEvents.RateLimited, logger.warn);
1820
bot.on("warn", logger.warn);
1921
bot.on("error", logger.error);
2022
bot.on("shardReady", shard => logger.notify(`Shard ${shard} ready`));

0 commit comments

Comments
 (0)