It can be used to send a custom DM to all players when an authorized user issues a chat command /bot send-poap. In the current version, the links are taken from a file it also keeps track of which user has sent a link with a log file. it also supports multiple sends if there are more users connecting later, also some other basic commands like teleporting the bot to the player, and disconnecting it.
Right now is pretty simple because is used only for what I needed, but I can add some new features that I think would be cool like:
Use sounds for announcing the POAP distribution( needs admin rights on space for playing sounds)
Use sounds for other events like bot connecting or disconnecting
Use other means to input the POAP links like a cloud DB(Supabase, Cloudflare, Fauna DB, etc) so would be easier to host it on a remote instance and not locally
Build a web interface for connecting and disconnecting the bot, input links, and issue other commands
This looks quite interesting. Unfortunately, I get this error message, when trying to run:
new engine constructed with id 0.32293904520097416
connecting spaceid\\spacename
Destroying engine in Game connect
engine 0.32293904520097416 _destroyInternal()
new engine constructed with id 0.3468386126183385
node:events:368
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '/path/to.log'
Emitted 'error' event on WriteStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/path/to.log'
}
I added an empty usedLINKS.db, because it’s been needed by index.js and I changed the this.authorizedUsers-Array. The .env file seems formated correctly. What did I miss here?
Try to create an empty folder logs, probably that error is because that folder is missing I added now some checks to create the missing files/folders, I should probably update the readme to add some examples for the .env file and links file.
It’s basically just a decentralized open database for achievements/badges that anyone can append to or query. This is possibly by them using the environmentally friendly gnosis/xdai blockchain.
Released V2: that supports more features, can be used in a docker image, has a backend and a frontend, and supports 2 database types file and Mongo, has some new commands check the repo if you’re interested same URL GitHub - andrei0x309/gather-town-WS-POAP-bot
Not sure if you are taking suggestions, but I would look into registerCommand and playerSendsCommand, instead of parsing through playerChats. IMO, makes for much cleaner UX.