Skip to content

Commit 5d08d4b

Browse files
fix: various linting issues
1 parent 003cc90 commit 5d08d4b

File tree

7 files changed

+15
-20
lines changed

7 files changed

+15
-20
lines changed

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { TypeBoxTypeProvider } from "@fastify/type-provider-typebox";
2-
31
import fastifyAuth from "@fastify/auth";
42
import fastifyCookie, { FastifyCookieOptions } from "@fastify/cookie";
53
import fastifyCors from "@fastify/cors";
4+
import { TypeBoxTypeProvider } from "@fastify/type-provider-typebox";
65
import { RewriteFrames } from "@sentry/integrations";
76
import Sentry from "@sentry/node";
87
import childProcess from "child_process";

src/interactions/buttons/edit.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import {
2-
APIEmbedAuthor,
3-
APIEmbedFooter,
42
APIMessageComponentGuildInteraction,
53
InteractionResponseType,
64
MessageFlags,

src/interactions/commands/chatInput/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ async function handlePermissionsListSubcommand({
144144
let description: string;
145145
let entitiesWithPermissions: { users: Snowflake[]; roles: Snowflake[] };
146146
if (channel) {
147-
description = `Users and roles with permissions on ${channel.name}`;
147+
description = `Users and roles with permissions on ${channel.name ?? ""}`;
148148
entitiesWithPermissions =
149149
await instance.permissionManager.getChannelEntitiesWithPermissions(
150150
channel.id
@@ -187,7 +187,9 @@ async function handlePermissionsListSubcommand({
187187
data: {
188188
embeds: [
189189
addTipToEmbed({
190-
title: `Permissions for ${channel ? "#" + channel.name : "guild"}`,
190+
title: `Permissions for ${
191+
channel ? "#" + (channel.name ?? "") : "guild"
192+
}`,
191193
description: description + extraDescription,
192194
color: embedPink,
193195
}),

src/interactions/commands/chatInput/send.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,14 @@ export default async function handleSendCommand(
8888
});
8989
if (contentOnly) {
9090
return createModal({
91-
title: `Sending a message to #${
92-
channel.name && channel.name.length > 23
93-
? `${channel.name.substring(0, 20)}...`
94-
: channel.name
91+
title: `Sending a message to ${
92+
channel.name !== null
93+
? `#${
94+
channel.name && channel.name.length > 23
95+
? `${channel.name.substring(0, 20)}...`
96+
: channel.name
97+
}`
98+
: "Unknown Channel"
9599
}`,
96100
custom_id: `send:${channelId}`,
97101
components: [

src/interactions/modals/report.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import prismaClient from "@prisma/client";
2-
const { ReportStatus } = prismaClient;
31
import {
42
APIModalSubmitGuildInteraction,
53
InteractionResponseType,

src/lib/messages/edit.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import { DiscordAPIError, RawFile } from "@discordjs/rest";
22
import { EmbedField, Message, MessageEmbed, Prisma } from "@prisma/client";
3-
import {
4-
APIEmbed,
5-
APIEmbedAuthor,
6-
APIEmbedFooter,
7-
Routes,
8-
Snowflake,
9-
} from "discord-api-types/v9";
3+
import { APIEmbed, Routes, Snowflake } from "discord-api-types/v9";
104
import { RESTPatchAPIChannelMessageResult } from "discord-api-types/v9";
115
import { FastifyInstance } from "fastify";
126

src/plugins/redis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class RedisCache {
1515

1616
private async _sendCommand(command: string, args: ArgType): Promise<unknown> {
1717
//this.logger.debug(`Sending redis command: ${command} with args: ${args}`);
18-
const data = (await this._client.call(command, ...args)) as unknown;
18+
const data = (await this._client.call(command, ...args));
1919
//this.logger.debug(
2020
// `Received data: ${data} from redis command: ${command} with args ${args}`
2121
//);

0 commit comments

Comments
 (0)