mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
Update
This commit is contained in:
parent
4e2a59645d
commit
cb95d595ac
1 changed files with 1 additions and 2 deletions
|
@ -2,7 +2,6 @@ import autobind from 'autobind-decorator';
|
||||||
import Module from '@/module';
|
import Module from '@/module';
|
||||||
import Message from '@/message';
|
import Message from '@/message';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import {ReadStream} from 'fs';
|
|
||||||
|
|
||||||
export default class extends Module {
|
export default class extends Module {
|
||||||
public readonly name = 'summonCat';
|
public readonly name = 'summonCat';
|
||||||
|
@ -39,7 +38,7 @@ export default class extends Module {
|
||||||
// https://aws.random.cat/meowにGETリクエストを送る
|
// https://aws.random.cat/meowにGETリクエストを送る
|
||||||
// fileに画像URLが返ってくる
|
// fileに画像URLが返ってくる
|
||||||
const res = await fetch('https://api.thecatapi.com/v1/images/search');
|
const res = await fetch('https://api.thecatapi.com/v1/images/search');
|
||||||
const json = await res.json();
|
const json = await res.json() as any;
|
||||||
console.table(json);
|
console.table(json);
|
||||||
const fileUri = json[0].url;
|
const fileUri = json[0].url;
|
||||||
// 拡張子を取り除く
|
// 拡張子を取り除く
|
||||||
|
|
Loading…
Reference in a new issue