UNPKG

lu-djs-utils

Version:

Un npm de utilidades para discord.js@v13

28 lines 927 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.chatBot = void 0; const axios_1 = __importDefault(require("axios")); /** * @method * @description ChatBot facil */ const chatBot = (opciones) => { const { message, entrada, id } = opciones; const urlBase = `https://api.monkedev.com/fun/chat`; return new Promise(async (ful, rej) => { try { const res = await axios_1.default.get(`${urlBase}?msg=${encodeURIComponent(entrada)}&uid=${id || message.author.id}`); if (!res.data) rej("Ocurrio un error"); ful(res.data); } catch (err) { rej(err); } }); }; exports.chatBot = chatBot; //# sourceMappingURL=chatBot.js.map