- Clone repository
git clone https://github.com/versx/RDMopole2
- Install dependencies
npm run update
- Copy config
cp src/configs/config.example.json src/configs/config.json
- Create a Discord bot at https://discord.com/developers and enter the
botToken
,clientId
, andclientSecret
in yourconfig.json
- Fill out config
vi src/configs/config.json
- Create or copy your existing geofences to the
geofences
folder. One geofence per file, the following is the expected format:[City Name] 0,0 1,1 2,2 3,3
- Run
npm start
- Access via http://machineip:port/ login using your Discord account
git pull
- Run
npm run update
in root folder - Run
npm start
If you want to host your images locally where RDM-opole2 resides, change your pokemon
and eggs
image urls to something like the following:
Pokemon Id is always 3 digits i.e 007
, 047
, 147
although form will be whatever the form number is i.e 12
, 195
, 4032
etc
"images": {
"pokemon": "https://mygod.github.io/pokicons/v2",
"eggs": "../img/eggs/%s.png"
},
Once everything is setup and running appropriately, you can add this to PM2 ecosystem.config.js file so it is automatically started:
module.exports = {
apps : [
{
name: 'RDM-opole2',
script: 'index.js',
cwd: '/home/username/RDM-opole2/src/',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
out_file: 'NULL'
}
]
};