This commit is contained in:
thororen1234 2024-07-18 16:27:48 -04:00
parent d595fc4e90
commit 71b2650f8c
2 changed files with 2 additions and 5 deletions

View file

@ -5,7 +5,6 @@
*/ */
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import axios from "axios";
import { ApplicationCommandOptionType } from "../../api/Commands"; import { ApplicationCommandOptionType } from "../../api/Commands";
import definePlugin from "../../utils/types"; import definePlugin from "../../utils/types";
@ -15,7 +14,7 @@ function rand(min, max) {
} }
async function fetchReddit(sub: string) { 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(); const resp = await res.json();
try { try {
const { children } = resp.data; const { children } = resp.data;

View file

@ -6,11 +6,9 @@
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import axios from "axios";
async function getcuteneko(): Promise<string> { 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; const url = (await res.json()).results[0].url as string;
return url; return url;
} }