If you need user submissions through Discord and/or Telegram and want it to work with Map-A-Droid, use this!
- Install dependencies --
npm install
- Copy
config.ini.example
toconfig.ini
- Fill in the config settings appropriately
discordChannel
- the specific channel id that will allow for user submissions- Can also use
all
for all channels to be valid
- Can also use
telegramChat
- the specific chat id that will allow for user submissions- Can also use
all
for all chats that the bot is in to register
- Can also use
discordtoken
- the token given to you by discord when you set your bot up- Look here for further information Creating a Discord Bot & Getting a Token
telegramtoken
- the token given to you by the BotFather when you set your bot up- See below for further instruction
screenshotsLocation
- the path on your machine to the screenshots folderconfirmationMessage
- send a message back to the channel when the bot has finished downloading the image and saving it in the screenshots foldertrue
orfalse
- Run the bot! -
node start.js
- It is highly suggested using a process manager for this such as pm2
- Talk to the BotFather in the web client
- Begin the conversation with
/start
- Proceed with
/newbot
- It will ask you a few questions like what you want to name it and what username it should have and
then give you a token - copy that into
telegramtoken
in your config
- Begin the conversation with
- Still talking to the BotFather, use
/setprivacy
and set it toDisable
-- This has be done before step 3, otherwise you have to kick and re-add your bot - Add your bot to your group or channel - mobile app is best for doing this -
example
- For channels you have to add the bot as an administrator
- Determine if you want to allow all places that the bot is included at to submit raid images or only one
- This is the
telegramChat
config option mentioned earlier - To get a chat id, follow this guide
- This is the
docker build -t madbot . # Build the docker Image
docker run -d madbot # Launch MADBot (Daemon Mode)
MADBot requires an access to the screenshot directory of Map-a-Droid
This can be done easily using -v option to map a local DIR in both MAD and MADBot