Render modal for user

Hello!

I tried to customize for myself the discourse-patreon plugin. This plugin renders prompt about donation after “topic-above-footer-buttons” for some conditions:

https://github.com/discourse/discourse-patreon/blob/main/assets/javascripts/discourse/initializers/patreon.js.es6

But I want to render the same in modal instead. I know about showModal and try to use it here, but unfortunately failed. Really don’t understand how I can achieve this in my case. Can anyone suggest what I need to do?

Best regards