diff --git a/src/class/apiclient.js b/src/class/apiclient.js deleted file mode 100644 index 006c734..0000000 --- a/src/class/apiclient.js +++ /dev/null @@ -1,35 +0,0 @@ -const axios = require("axios"); -const config = require("../utils/config.json"); -/** - * @class APIClient - **/ -class APIClient { - /** - * @name APIClient - * @kind constructor - * @param {String} key Authorization Key for API (Only for CODM commands) - * @param {String} [options.key] - */ - constructor(key, options = {}) { - if (key && typeof key !== "string") - throw new TypeError("API key must be a string"); - if (key) this.key = key; - } - /** - * Sends a CODM perk object - * @returns {Promise} - * @param {String} name - */ - async getperk(name) { - const data = await axios - .get(`${config.api}/api/v1/codm/perks?name=${name}`, { - headers: { - Authorization: this.key, - }, - }) - .then(res => res.data) - .catch(err => console.error(`Unauthorized to use`)); - return data; - } -} -module.exports = APIClient; diff --git a/src/functions/8ball.js b/src/functions/8ball.js deleted file mode 100644 index 6e4b21f..0000000 --- a/src/functions/8ball.js +++ /dev/null @@ -1,13 +0,0 @@ -const axios = require("axios"); -const config = require("../utils/config.json"); -/** - * Sends a 8ball response - * @returns {Promise} - */ -async function random() { - const data = await axios - .get(`${config.api}/api/v1/fun/8ball`) - .then(res => res.data); - return data.answer; -} -module.exports = random; diff --git a/src/typings/index.d.ts b/src/typings/index.d.ts deleted file mode 100644 index 17830a9..0000000 --- a/src/typings/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -declare module "cath" { - export class APIClient { - public constructor(key: string, options?: APIClientOptions); - - private key: string; - public options?: APIClientOptions; - - public random8ball(): Promise; - public getperk(perk: string): Promise; - } - export type APIClientOptions = { - codm?: string; - }; -} diff --git a/src/utils/config.json b/src/utils/config.json deleted file mode 100644 index fcb8deb..0000000 --- a/src/utils/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "api": "https://www.cathapi.gq" -}