Discord bot made for NEO community.
This bot is specially made for the NEO (previously ANS) Discord server. Its purpose is to provide a multitude of functionality for new and seasoned members. Its primary function is to respond to certain text in channels by sending the user a message with information, such as "The current GAS price is $10, B$0.00001 and rank 5".
You can use the discord api methods listed here:
client
is the client is Discord clientmessage
is the message object
To write extra modules please take a look at the imports/commands
folder.
const request = require('request');
const currency = require('currency-formatter');
// Export the module so it can be imported
module.exports = (client, message) => {
// Get the url and give back a json result
request.get({
url: 'https://api.coinmarketcap.com/v1/ticker/neo/?convert=USD',
json: true
},
function (e, r, prices) {
const price = prices[0];
// Send a message to the channel
message.channel.send(`The current NEO price is ${currency.format(price.price_usd, { code: 'USD' })}, B${price.price_btc} and rank ${price.rank}`);
});
};
- Clone this repository
- In the directory where it's located do
npm install
- Change the value in index.js [BOT_API_KEY], bot.js[MARKET_PRICE_CHANNEL] and report.js[REPORT_CHANNEL] to your own values
- Run the bot with
node index --apiKey "your_discord_api_key"
- Modular system
- Initial modules
- Text recognition
- Remove command when said
- Respond privately
- Add ignore feature
- More modules