aaaa
This commit is contained in:
parent
c346bc87db
commit
86c545cb45
4 changed files with 7 additions and 4 deletions
|
@ -1 +1,2 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
|
.git
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM docker.io/library/node:17-alpine
|
FROM docker.io/library/node:18-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
|
|
|
@ -48,7 +48,7 @@ export async function parseLog(s: string): Promise<MessageEmbed | null> {
|
||||||
const id = link.replace('https://mclo.gs/', '');
|
const id = link.replace('https://mclo.gs/', '');
|
||||||
if (!id) return null;
|
if (!id) return null;
|
||||||
const apiUrl = 'https://api.mclo.gs/1/raw/' + id;
|
const apiUrl = 'https://api.mclo.gs/1/raw/' + id;
|
||||||
console.log(apiUrl);
|
|
||||||
let log: string;
|
let log: string;
|
||||||
try {
|
try {
|
||||||
const f = await fetch(apiUrl);
|
const f = await fetch(apiUrl);
|
||||||
|
@ -56,9 +56,11 @@ export async function parseLog(s: string): Promise<MessageEmbed | null> {
|
||||||
throw 'nope';
|
throw 'nope';
|
||||||
}
|
}
|
||||||
log = await f.text();
|
log = await f.text();
|
||||||
} catch (_) {
|
} catch (err) {
|
||||||
|
console.log('Log analyze fail', err);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
console.log(apiUrl);
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setTitle('Log analyzer')
|
.setTitle('Log analyzer')
|
||||||
.setColor('DARK_GREEN')
|
.setColor('DARK_GREEN')
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "log",
|
"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",
|
"name": "java",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue