therealguy90 / foundrytodiscord

A FoundryVTT module that sends all FoundryVTT messages to a Discord webhook.
https://ko-fi.com/loki123
MIT License
15 stars 2 forks source link

(Pathfinder 2e) Fails to parse damage rolls and send to Discord for items that have splash damage #41

Closed tuhs1985 closed 4 months ago

tuhs1985 commented 4 months ago

Describe the bug (Pathfinder 2e) Fails to parse damage rolls and send to Discord for items that have splash damage

To Reproduce Steps to reproduce the behavior:

  1. Use any item that has splash in the damage roll (Alchemist Fire, Acid Splash, etc)
  2. Click Roll Damage
  3. See Error
    pf2e.mjs:772  Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'terms')
    at pf2e.mjs:772:60
    at Array.forEach (<anonymous>)
    at pf2e.mjs:768:27
    at Array.forEach (<anonymous>)
    at MessageParserPF2e._generateRollBreakdown (pf2e.mjs:710:20)
    at pf2e.mjs:778:52
    at Array.forEach (<anonymous>)
    at MessageParserPF2e._generateRollBreakdown (pf2e.mjs:710:20)
    at pf2e.mjs:751:55
    at Array.forEach (<anonymous>)
    at pf2e.mjs:750:32
    at Array.forEach (<anonymous>)
    at MessageParserPF2e._generateRollBreakdown (pf2e.mjs:710:20)
    at pf2e.mjs:465:46
    at Array.forEach (<anonymous>)
    at MessageParserPF2e._createRollEmbed (pf2e.mjs:461:31)
    at MessageParserPF2e.parseMessage (generic.mjs:75:35)
    at async tryPOST (main.js:168:25)
    at async Object.fn (main.js:70:9)

    Foundry to Discord.log

Expected behavior Should parse roll information and post to Discord Chat

Additional context Foundry V11 (315), Pathfinder Version 5.16.1, new instance on Forge

therealguy90 commented 4 months ago

Looking into this now.

therealguy90 commented 4 months ago

Looks like this is a v11 issue. v12 works fine. Working on restoring compatibility.