updated tsconfig

This commit is contained in:
2022-02-13 20:11:37 -06:00
parent 3d69a9375e
commit 84482be886
4 changed files with 12 additions and 21 deletions

View File

@@ -93,9 +93,9 @@ function readHTML(html: string): uniteApiData {
}; };
//filter down to just ones named "og:..." //filter down to just ones named "og:..."
metaElems = metaElems.filter(el => el.attribs.property?.startsWith('og:')); metaElems = metaElems.filter((el: cheerio.Element) => el.attribs.property?.startsWith('og:'));
metaElems.forEach(el => { metaElems.forEach((el: cheerio.Element) => {
let attr = el.attribs; let attr = el.attribs;
if (attr.property === 'og:title') { if (attr.property === 'og:title') {
@@ -107,7 +107,7 @@ function readHTML(html: string): uniteApiData {
} else if (attr.property === 'og:description') { } else if (attr.property === 'og:description') {
//all lines //all lines
let lines = attr.content.split('\n').map(l => l.trim()), let lines = attr.content.split('\n').map((l: string) => l.trim()),
extraLines: string[] = []; extraLines: string[] = [];
//ensure first line is correct //ensure first line is correct
@@ -162,9 +162,9 @@ function readHTML(html: string): uniteApiData {
lines.shift(); lines.shift();
//rest of lines //rest of lines
lines.forEach(line => { lines.forEach((line: string) => {
let split = line.split(':').map(l => l.trim()), let split = line.split(':').map((l: string) => l.trim()),
key = split[0].toLowerCase().replace(/[^\w]/g, ''), key = split[0].toLowerCase().replace(/[^\w]/g, ''),
value = split[1]; value = split[1];

View File

@@ -45,8 +45,8 @@ const commands = [
} }
] ]
} }
], ]/*,
commandNames = commands.map(c => c.name); commandNames = commands.map(c => c.name);*/
/** /**
* register/reload commands on guild(s) * register/reload commands on guild(s)

View File

@@ -3,7 +3,7 @@
join message should contain your current position in the queue, editing it to keep it current join message should contain your current position in the queue, editing it to keep it current
*/ */
import { Client, CommandInteraction, GuildMember, MessageEmbed, TextChannel } from "discord.js"; import { Client, CommandInteraction, MessageEmbed, TextChannel } from "discord.js";
import * as fs from 'fs'; import * as fs from 'fs';
import { emsg, getChannel, getMember, memberIsModThrow, queueInfo, queueInfoBase } from "./util"; import { emsg, getChannel, getMember, memberIsModThrow, queueInfo, queueInfoBase } from "./util";
import { Lang } from './lang'; import { Lang } from './lang';
@@ -75,18 +75,6 @@ namespace Queue {
} }
} }
export function addPlayer(channelId: string, member: GuildMember) {
if (QUEUE.has(channelId)) {
QUEUE.delete(channelId);
}
}
export function removePlayer(channelId: string, member: GuildMember) {
if (QUEUE.has(channelId)) {
QUEUE.delete(channelId);
}
}
} }
SaveQueue(); SaveQueue();

View File

@@ -6,7 +6,10 @@
"outDir": "./dist", "outDir": "./dist",
"esModuleInterop": true, "esModuleInterop": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"strict": true, "strict": true,
"skipLibCheck": true "noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
} }
} }