From: MatthieuCoder Date: Wed, 4 Jan 2023 22:30:42 +0000 (+0400) Subject: fix small errors in linting X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=eb5e4b49d22ff9c96e7d465f0ecd88d27273f99a;p=matthieu%2Fgru.git fix small errors in linting --- diff --git a/package.json b/package.json index 547a2be..4db2b8f 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,9 @@ "import/extensions": "off", "unicorn/prefer-top-level-await": "off", "no-constructor-return": "off", - "unicorn/no-array-reduce": "off" + "unicorn/no-array-reduce": "off", + "import/no-unassigned-import": "off", + "n/file-extension-in-import": "off" }, "prettier": true } diff --git a/src/commands/ping.ts b/src/commands/ping.ts index 8e03af8..f92485b 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -4,7 +4,7 @@ import { ApplicationCommandOptionType, ApplicationCommandType, InteractionResponseType, -} from 'discord-api-types/v10.js'; +} from 'discord-api-types/v10'; import {promise} from 'ping'; import {CommandBuilder, type HandlerFn} from '../sys/handler'; diff --git a/src/sys/events/client.ts b/src/sys/events/client.ts index 73fe34f..562ff47 100644 --- a/src/sys/events/client.ts +++ b/src/sys/events/client.ts @@ -3,10 +3,9 @@ import {type CamelCase, type PascalCase} from 'type-fest'; import {REST, type RESTOptions} from '@discordjs/rest'; import { type APIInteractionResponse, - type APIInteractionResponseCallbackData, type GatewayDispatchPayload, type GatewayInteractionCreateDispatchData, -} from 'discord-api-types/v10.js'; +} from 'discord-api-types/v10'; import type TypedEmitter from 'typed-emitter'; import {API} from '@discordjs/core'; import {Transport, type TransportOptions} from './transport'; @@ -109,7 +108,7 @@ export class Client extends undefinedClient { transport: TransportOptions; }) { super(); - this.rest = new REST(options.rest); + this.rest = new REST(options.rest).setToken('_'); this.transport = new Transport(this, options.transport); this.api = new API(this.rest); diff --git a/src/sys/events/transport.ts b/src/sys/events/transport.ts index 1a2e86a..cd2d8c2 100644 --- a/src/sys/events/transport.ts +++ b/src/sys/events/transport.ts @@ -12,7 +12,7 @@ import { type APIInteractionResponseCallbackData, type GatewayDispatchPayload, Routes, -} from 'discord-api-types/v10.js'; +} from 'discord-api-types/v10'; import {type CamelCase} from 'type-fest'; import {type Client, type EventName, type EventsHandlerArguments} from '.'; diff --git a/src/sys/handler/index.ts b/src/sys/handler/index.ts index 2d5e232..a832d12 100644 --- a/src/sys/handler/index.ts +++ b/src/sys/handler/index.ts @@ -7,7 +7,7 @@ import { type RESTPostAPIChatInputApplicationCommandsJSONBody, Routes, type APIInteractionResponse, -} from 'discord-api-types/v10.js'; +} from 'discord-api-types/v10'; export * from './builder';