chore: fix lint errors; tweak lint rules

This commit is contained in:
Dragory 2023-05-08 22:58:51 +03:00
parent 9b3d6f5d68
commit 5f194bf1ef
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
115 changed files with 176 additions and 264 deletions

View file

@ -25,7 +25,7 @@ export const AboutCmd = utilityCmd({
try {
const lcl = new LCL(rootDir);
lastCommit = await lcl.getLastCommit();
} catch {} // tslint:disable-line:no-empty
} catch {} // eslint-disable-line no-empty
let lastUpdate;
let version;

View file

@ -31,8 +31,6 @@ function resizeBuffer(input: Buffer, width: number, height: number): Buffer {
return photonImageToBuffer(photonImage);
}
const CDN_URL = "https://twemoji.maxcdn.com/";
export const JumboCmd = utilityCmd({
trigger: "jumbo",
description: "Makes an emoji jumbo",
@ -75,7 +73,7 @@ export const JumboCmd = utilityCmd({
let image: Buffer | undefined;
try {
const downloadedBuffer = await getBufferFromUrl(url);
image = resizeBuffer(await getBufferFromUrl(url), size, size);
image = resizeBuffer(downloadedBuffer, size, size);
} catch (err) {
if (url.toLocaleLowerCase().endsWith("fe0f.png")) {
url = url.slice(0, url.lastIndexOf("-fe0f")) + ".png";

View file

@ -1,9 +1,8 @@
import { Message } from "discord.js";
import { performance } from "perf_hooks";
import { noop, trimLines } from "../../../utils";
import { utilityCmd } from "../types";
const { performance } = require("perf_hooks");
export const PingCmd = utilityCmd({
trigger: ["ping", "pong"],
description: "Test the bot's ping to the Discord API",

View file

@ -7,7 +7,7 @@ export const ReloadGuildCmd = utilityCmd({
description: "Reload the Zeppelin configuration and all plugins for the server. This can sometimes fix issues.",
permission: "can_reload_guild",
async run({ message: msg, args, pluginData }) {
async run({ message: msg, pluginData }) {
if (activeReloads.has(pluginData.guild.id)) return;
activeReloads.set(pluginData.guild.id, msg.channel as TextChannel);