mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
Fetch
This commit is contained in:
parent
d595fc4e90
commit
71b2650f8c
2 changed files with 2 additions and 5 deletions
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import axios from "axios";
|
||||
|
||||
import { ApplicationCommandOptionType } from "../../api/Commands";
|
||||
import definePlugin from "../../utils/types";
|
||||
|
@ -15,7 +14,7 @@ function rand(min, max) {
|
|||
}
|
||||
|
||||
async function fetchReddit(sub: string) {
|
||||
const res = (await axios.get(`https://www.reddit.com/r/${sub}/top.json?limit=100&t=all`)).data;
|
||||
const res = await fetch(`https://www.reddit.com/r/${sub}/top.json?limit=100&t=all`);
|
||||
const resp = await res.json();
|
||||
try {
|
||||
const { children } = resp.data;
|
||||
|
|
|
@ -6,11 +6,9 @@
|
|||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import axios from "axios";
|
||||
|
||||
|
||||
async function getcuteneko(): Promise<string> {
|
||||
const res = (await axios.get("https://nekos.best/api/v2/neko")).data;
|
||||
const res = await fetch("https://nekos.best/api/v2/neko");
|
||||
const url = (await res.json()).results[0].url as string;
|
||||
return url;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue