Poopies for you.
const Poopy = require('poopy')
let poopy = new Poopy({
testing: true,
keyLimit: 1500,
globalPrefix: 'i:'
})
poopy.start(process.env.DEFAULT_TOKEN)
If you wanna host this bot you'll need to install the following tools and add some to your environment variables:
You can also try and run the install
script that corresponds to your system to do the job for you.
After everything's installed, run the build
script to set up the binaries and dependencies.
For the bot to authenticate, you'll need a Discord bot token (DEFAULT_TOKEN
or TEST_TOKEN
), and a completely random AUTH_TOKEN
to encrypt and decrypt some data that is stored. You can easily get a Discord token by going to your application (or creating one if you haven't) in the Discord Developer Portal, then going to the bot section and copying the generated token.
After retrieving your token, you can run these commands in the root folder (Linux systems only):
chmod u+x start.sh
./start <auth token> <bot token>
Upon executing these commands, both tokens will be stored in a file named tokens.poo
(backup) and as environment variables.
You can also just run node server.js
in the current folder to start him up, and optionally append the --test
flag to it. Keep in mind you'll still have to store the token in the environment variables.
There's also a script for a worker you can run to do background tasks like image processing by typing in node worker.js
, but you need a CloudAMQP instance to do so.
Here's a list of tokens you can set up in system variables to bring more functionality to Poopy:
-
AUTH_TOKEN
(SET THIS TO SOMETHING COMPLETELY RANDOM! mainly used for encrypting/decrypting messages and private tokens from people, can also be used to access private apis from the website) -
BOT_WEBSITE
(url if you want a website for your bot) -
HIVEMIND_ID
(id for your bot to participate in the hivemind, leave blank to not have any of the hivemind functionality) -
DISCORD_REFRESHER_TOKEN
(discord user token used for refreshing expired urls, without it using keywords such as _ps and _shit will generally not function if you don't manually refresh the url) -
CLOUDAMQP_URL
(url used to send file processing queues, accessed at https://api.cloudamqp.com/console/`APP-ID`/details) -
MONGOOSE_URL
(url used to access the database, generated at https://cloud.mongodb.com/v2/`PROJECT-ID`#clusters/connect) -
AI21_KEY
(key generated when you sign up in ai21 for generating text, accessed at https://studio.ai21.com/account/account) -
GOOGLE_KEY
(key from google cloud for accessing the youtube api, generated at https://console.cloud.google.com/apis/credentials?project=`PROJECT-ID`) -
MAKESWEET_KEY
(key from makesweet for generating heartlocket gifs, dm @mkswt on twitter asking for one) -
RANDOMSTUFF_KEY
(key used for a cleverbot alternative when it breaks, generated at https://api-info.pgamerx.com/manage-key) -
RAPIDAPI_KEY
(key from rapid api when you sign up, accessed at https://rapidapi.com/developer/security/`APP-NAME`)you'll also need to subscribe to all of these apis:
- https://rapidapi.com/microsoft-azure-org-microsoft-cognitive-services/api/microsoft-computer-vision3/ (ocr api)
- https://rapidapi.com/microsoft-azure-org-microsoft-cognitive-services/api/microsoft-translator-text/ (translation api)
- https://rapidapi.com/microsoft-azure-org-microsoft-cognitive-services/api/bing-web-search1/ (bing search api)
- https://rapidapi.com/hivoicy-vxmKOG2vl/api/speech-recognition-english1/ (speech to text api)
- https://rapidapi.com/mirzahadjaevaguzal/api/shazam-song-recognizer/ (shazam api to identify songs)
- https://rapidapi.com/pgamerxdev/api/random-stuff-api/ (the random stuff api i talked about)
-
REMOVEBG_KEY
(key from remove.bg, generated at https://www.remove.bg/dashboard#api-key) -
TENOR_KEY
(key generated by tenor when signing up, accessed at https://tenor.com/developer/dashboard)
Horse