Skip to content

Commit

Permalink
chore(deps): update eslint dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiramitzu committed Nov 24, 2023
1 parent 04a436d commit 11318ab
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 84 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"@types/node": "20.10.0",
"@types/node-fetch": "2.6.9",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "6.10.0",
"@typescript-eslint/parser": "6.10.0",
"eslint": "8.53.0",
"@typescript-eslint/eslint-plugin": "6.12.0",
"@typescript-eslint/parser": "6.12.0",
"eslint": "8.54.0",
"rimraf": "5.0.5",
"typescript": "5.2.2"
"typescript": "5.3.2"
},
"dependencies": {
"discord.js": "^14.14.1",
Expand Down
147 changes: 71 additions & 76 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/modules/Discord.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WebhookClient, Client, GatewayIntentBits, GatewayReceivePayload, GatewayDispatchEvents } from "discord.js";
import { WebhookClient, Client, GatewayIntentBits, GatewayReceivePayload, GatewayDispatchEvents, GatewayOpcodes } from "discord.js";
import { channelId, discordToken, headers, serverId, webhookUrl } from "../util/env.js";
import { Channel, Things, WebsocketTypes } from "../typings/index.js";
import fetch from "node-fetch";
Expand Down Expand Up @@ -50,7 +50,7 @@ export const listen = (): void => {
const { op, d, s, t } = payload;

switch (op) {
case 10:
case GatewayOpcodes.Hello:
try {
ws.send(
JSON.stringify({
Expand All @@ -70,7 +70,7 @@ export const listen = (): void => {
console.log(e);
}
break;
case 11:
case GatewayOpcodes.HeartbeatAck:
if (!authenticated) {
authenticated = true;
ws.send(
Expand All @@ -88,7 +88,7 @@ export const listen = (): void => {
);
}
break;
case 0:
case GatewayOpcodes.Dispatch:
if (
t === GatewayDispatchEvents.MessageCreate &&
d.guild_id === serverId &&
Expand Down

0 comments on commit 11318ab

Please sign in to comment.