updated tsconfig
This commit is contained in:
10
src/api.ts
10
src/api.ts
@@ -93,9 +93,9 @@ function readHTML(html: string): uniteApiData {
|
||||
};
|
||||
|
||||
//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;
|
||||
|
||||
if (attr.property === 'og:title') {
|
||||
@@ -107,7 +107,7 @@ function readHTML(html: string): uniteApiData {
|
||||
} else if (attr.property === 'og:description') {
|
||||
|
||||
//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[] = [];
|
||||
|
||||
//ensure first line is correct
|
||||
@@ -162,9 +162,9 @@ function readHTML(html: string): uniteApiData {
|
||||
lines.shift();
|
||||
|
||||
//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, ''),
|
||||
value = split[1];
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ const commands = [
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
commandNames = commands.map(c => c.name);
|
||||
]/*,
|
||||
commandNames = commands.map(c => c.name);*/
|
||||
|
||||
/**
|
||||
* register/reload commands on guild(s)
|
||||
|
||||
14
src/queue.ts
14
src/queue.ts
@@ -3,7 +3,7 @@
|
||||
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 { emsg, getChannel, getMember, memberIsModThrow, queueInfo, queueInfoBase } from "./util";
|
||||
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();
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
"outDir": "./dist",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user