aaaa
This commit is contained in:
parent
c346bc87db
commit
86c545cb45
4 changed files with 7 additions and 4 deletions
|
@ -1 +1,2 @@
|
|||
node_modules/
|
||||
.git
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue