MetaFam / TheGame

The platform that MetaGame will be played on aka MetaOS - an open source framework for running decentralized societies. Currently featuring MyMeta Profiles, Dashboard & Quests
https://metagame.wtf
Other
131 stars 78 forks source link

Discord Bot is not in Sync with Hasura #1672

Open Seroxdesign opened 10 months ago

Seroxdesign commented 10 months ago

What happened?

The bot is failing to sync memberships in Metagame

What did you expect to happen?

When a role is given in discord, the bot will automatically provide membership in the MG guild

How can we reproduce the problem (as minimally as possible)?

Give a player role to member in Discord, then test if they are included in the Guild

Is there anything else we need to know?

No response

Browser and operating system used (if applicable)

No response

alalonde commented 9 months ago

I spent 2+ hours looking this and don't think there's an issue with the sync process at all. With your user, the issue is that there is no discordId attached, so we can't identify you as being in our discord server with the Player role. The way we had been doing this was with the set-eth-address command handled by the Discord bot, but we ditched all that when we moved away from sourcecred.

So we would need a new way to associate players with their Discord account. The best way to do this would be somewhere in the onboarding flow, but we would need a way for existing players to do it as well. Most of the code for authenticating via Discord already exists.

The other option would be to move away from the Discord integration entirely for our "verified" guild memberships. Now that we don't reliably have discord associations with players, this way of determining guild membership is much less reliable.