Pathfinder-Discord-Bot icon indicating copy to clipboard operation
Pathfinder-Discord-Bot copied to clipboard

Names not found in all commands

Open TarEcthelion opened this issue 4 years ago • 4 comments

Currently there appears to be a bug parsing/addressing some names (ones with spaces it seems) in some commands (Damage and Remove for example)

Duplication !omni add enemy 'War Boss' AC:40 HP:300/300 Init:{1d20+10} !damage 'War Boss' 5 !omni remove enemy 'War Boss'

TarEcthelion avatar May 15 '20 00:05 TarEcthelion

Well crap. That does indeed look to be a bug. Is this currently affecting your game, or was this just during testing?

TheCraiggers avatar May 18 '20 18:05 TheCraiggers

Testing; I was learning what it was capable of and playing with the examples.

Your choice to use a dedicated data channel works to my advantage here though, I was able to remove the data manually there. And as long as I keep the name(s) simple it's ok. I've never been a big JS guy, and I've never played with "promises" but I started looking... ;-) Just haven't found the cause yet.

Great work overall though... super impressed. Looking forward to seeing it live and grow, happy to help.

TarEcthelion avatar May 18 '20 20:05 TarEcthelion

Hah, I've never been a big JS guy either. And promises were alien to me before I started this project. In fact, I started this in order to learn modern JS. Mostly what I've learned is that I kinda dislike it. Another contributor is working on migrating the codebase to TypeScript though, which might help some of my annoyances, so I'm trying to withhold judgement until then. =)

TheCraiggers avatar May 19 '20 17:05 TheCraiggers

https://blog.bitsrc.io/keep-your-promises-in-typescript-using-async-await-7bdc57041308

Who needs promises anyway? ;)

mirkoRainer avatar May 20 '20 10:05 mirkoRainer