chrislennon / lnbits-discord-bot

MIT License
13 stars 11 forks source link

Question about lnbits discord bot #5

Open Bennettd77 opened 3 years ago

Bennettd77 commented 3 years ago

Hey Chris,

@arcbtc on twitter told me you were working on this project and I thought I'd ask you the following:

Could this bot include functionality to present an ln invoice that resolves into a one-time Discord invite for another Discord server?

We are seeing a lot of DM bot attacks and it seems to center around the fact that once a bot is in a server it can scan the user list immediately and start spamming DMs to the users in that list. Is there a way to use this, inside of Discord as a bot, to firewall entry into a Discord server so that only those people who want to pay the invoice get in? This would seem to greatly limit the kind of automated botting attacks we're seeing from the start. I've seen this done in Telegram but not sure if a bot wouldn't be able to have already scanned that user list before the invoice times out.

I would think we'd have to run the bot on a different server (that purges it's user list every 5 minutes or so), have it present an invoice that resolves into a one-time invite to the real server or something along those lines.

I appreciate your time, Chris.

Thank you.

David (@bennd77 on Twitter)

chrislennon commented 3 years ago

Hey there 👋

That's a really interesting use case I hadn't thought of! Thanks for that!

First off, super early days here - basically just getting base level interactions and extension built for lnbits (PR is open for testing at the moment lnbits/lnbits#258).

I can see two ways of handling this:

  1. I'm fairly sure the situation you describe could be possible, A bot with invite control of the main server could issue the invite to the user upon payment of an invoice.

  2. Another approach could be to run the bot on your main server and provide a role to a user (allowing access to channels) on payment of invoice, which setup/bot instance wise could be simpler.

I'm not sure how the interface/extension for this would look yet, I had intent to build 2 at some point - some further thoughts required on how this would be managed from the lnbits extension side I feel

Bennettd77 commented 3 years ago

Thanks for the reply. I figured you were very early on in this project but felt compelled to reach out with this idea as I think it would be a great way to combat these spam bots. These things are all over the place. Like cockroaches.