A Discord bot for looking up Path of Exile items on the Wiki. It will post an image of the Item information from the wiki if it's available. Otherwise it will post a direct link to the Wiki Page.
The bot uses Puppeteer to load the relevant wiki page for the item passed in. Once the page has loaded it then takes a screenshot of the Item div. Puppeteer uses Chromium which means the bot takes up a reasonable amount of disk space (just under 300MB).
This requires Node.js version 7.6+ at a minimum, as it uses async/await calls.
Update the token value in config.json with your Discord Bot token.
Run npm install
Start the bot with node app.js
You should be able to edit the wikiURL and wikiDiv settings in the config.json to a different Wiki.
The wikiDiv is the CSS selector that the bot will screenshot.
There are two issues with running it on Ubuntu (and possibly other distros).
- Puppeteer won't start in a sandbox, so this feature is diabled, which isn't recommended from a security standpoint. Remove these options in the puppeteer.launch to enable sandbox mode: '--no-sandbox', '--disable-setuid-sandbox'
- Puppeteer will also stop sending web pages after a number of requests, which the flag '--disable-dev-shm-usage' should fix.
Settings available in the config.json are:
Settings | Default Value |
---|---|
token | |
wikiURL | "https://pathofexile.gamepedia.com/" |
wikiDiv | ".infobox-page-container > .item-box" |
wikiInvalidPage | ".noarticletext" |
wikiInfoDiv | ".infocard" |
width | 2500 |
height | 2500 |
enableJavascript | false |
syntax: [[ItemName]]
Although I originally created this bot (in a non-functioning state), credit must go to https://github.com/daleroy1/PoEWikiBot who put in a lot of work making it work for its original intention, and sharing it with the PoE community