Forien / foundryvtt-forien-easy-polls

Module allowing to create, manage, vote and see results of Polls in Chat Log during games played via Foundry VTT.
MIT License
4 stars 2 forks source link

Open a "Create Poll" Dialog with macro? #14

Closed MastaGooz closed 8 months ago

MastaGooz commented 8 months ago

Hi ! I love this module, thanks for doing it !

I was wondering if there is a way to open a "Create Poll" Dialog via a macro?

Forien commented 8 months ago

Hey,

I'm happy that you find my module useful :)

And yes, there is a way via Forien's Easy Polls' API. Here is how you can do it:

game.modules.get('forien-easy-polls').api.renderPollDialog();

Similarly, if you would like to be able to open Saved Polls Dialog, you can use:

game.modules.get('forien-easy-polls').api.renderSavedPollsApp();

Let me know if there are any further issues :)

MastaGooz commented 8 months ago

Thanks man, this is awesome !