UNPKG

pokecord-bot

Version:

This package lets you get the name of an image of a pokemon from the discord bot, Pokecord.

39 lines (28 loc) 757 B
const axios = require('axios') let token = "" exports.login = function (username,password) { return axios.post('https://pokemonnames.herokuapp.com/login',{ username: username, password: password }) .then(response => { token = response.data }) .catch(err => { return err }) } exports.pokecord = function (image,language) { return axios.post('https://pokemonnames.herokuapp.com/pokecord',{ token: token, image: image, language: language }) .then(response => { console.log(token) return response.data }) .catch(err => { console.log(err) }) }