This commit is contained in:
dada513 2022-06-07 12:40:54 +02:00
parent c346bc87db
commit 86c545cb45
No known key found for this signature in database
GPG key ID: 403448C14FA4B33E
4 changed files with 7 additions and 4 deletions

View file

@ -1 +1,2 @@
node_modules/
.git

View file

@ -1,4 +1,4 @@
FROM docker.io/library/node:17-alpine
FROM docker.io/library/node:18-alpine
WORKDIR /app
COPY . .
RUN yarn install --frozen-lockfile

View file

@ -48,7 +48,7 @@ export async function parseLog(s: string): Promise<MessageEmbed | null> {
const id = link.replace('https://mclo.gs/', '');
if (!id) return null;
const apiUrl = 'https://api.mclo.gs/1/raw/' + id;
console.log(apiUrl);
let log: string;
try {
const f = await fetch(apiUrl);
@ -56,9 +56,11 @@ export async function parseLog(s: string): Promise<MessageEmbed | null> {
throw 'nope';
}
log = await f.text();
} catch (_) {
} catch (err) {
console.log('Log analyze fail', err);
return null;
}
console.log(apiUrl);
const embed = new MessageEmbed()
.setTitle('Log analyzer')
.setColor('DARK_GREEN')

View file

@ -10,7 +10,7 @@
},
{
"name": "log",
"text": "https://i.imgur.com/gsrgYzg.png"
"text": "Please send logs: https://cdn.discordapp.com/attachments/981957331430539267/983680253367058452/1.png https://cdn.discordapp.com/attachments/981957331430539267/983680253715165234/2.png"
},
{
"name": "java",