0

I am creating a Discord bot in Javascript which is going to be a crypto game that I want to make, and I would like my users/players to use meta mask as a wallet... Is it possible with an API or a library or something to connect my players' meta mask wallets to my Discord bot ? Or would I have to open a browser everytime I wanna do something that has to do with meta mask (Like transactions) and create a web server for that ?

Also do my bot literally just need their wallet address and nothing else to be able to send them stuff or make them pay for something ?

Thanks :)

1 Answer 1

0

So, you have a few things that you're going to do in order to have your discord bot communicate with the blockchain in general.

I'd recommend checking out Moralis, as they have neat ways of authenticating users and retrieving data associated with their wallets.

You are going to run into problems if you are trying to trigger blockchain actions using Discord. The only way you could do this is if you had access to their private keys. Like, it's possible, but not feasible, due to security risks.

As for like associating a discord id with a blockchain wallet, that can definitely be done relatively easily and has been done quite a few times. See https://brahma.fi 's Karma implementation. Good example of what can be done.

1
  • What I thought of doing maybe was to have a very simple web page running on the same server as the discord bot and whenever i need meta mask authorization from the user i just give him the link to open the web page to ask meta mask to sign etc and then send the discord bot the response or something like that what do you think ?
    – GaLzZy
    Oct 4, 2022 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.