#AA Discord Multiverse

1 messages · Page 1 of 1 (latest)

wet hill
#

post

#

post

ivory mica
#

And sorry if I'm bothering anyone but my python experience is rather limited, I mainly do c#

slow lintel
#
==> myauth/log/allianceauth.log <==
[08/Sep/2025 14:20:16] INFO [allianceauth.services.modules.discord.discord_client.client:667] [Discord Service] f1607cf88cbe11f0847bc87f5437bb04: sending GET request to url 'https://discord.com/api/users/@me'

==> myauth/log/gunicorn.log <==
[08/Sep/2025 14:20:16] INFO [allianceauth.services.modules.discord.discord_client.client:667] [Discord Service] f1607cf88cbe11f0847bc87f5437bb04: sending GET request to url 'https://discord.com/api/users/@me'

==> myauth/log/allianceauth.log <==
[08/Sep/2025 14:20:17] INFO [allianceauth.services.modules.discord.discord_client.client:667] [Discord Service] f18ac97c8cbe11f0847bc87f5437bb04: sending GET request to url 'https://discord.com/api/guilds/800429905371594752/members/259357133592723456'

==> myauth/log/gunicorn.log <==
[08/Sep/2025 14:20:17] INFO [allianceauth.services.modules.discord.discord_client.client:667] [Discord Service] f18ac97c8cbe11f0847bc87f5437bb04: sending GET request to url 'https://discord.com/api/guilds/800429905371594752/members/259357133592723456'

==> myauth/log/allianceauth.log <==
[08/Sep/2025 14:20:17] INFO [allianceauth.services.modules.discord.discord_client.client:667] [Discord Service] f1b5c9d88cbe11f0847bc87f5437bb04: sending PATCH request to url 'https://discord.com/api/guilds/800429905371594752/members/259357133592723456'

==> myauth/log/gunicorn.log <==
[08/Sep/2025 14:20:17] INFO [allianceauth.services.modules.discord.discord_client.client:667] [Discord Service] f1b5c9d88cbe11f0847bc87f5437bb04: sending PATCH request to url 'https://discord.com/api/guilds/800429905371594752/members/259357133592723456'

==> myauth/log/allianceauth.log <==
[08/Sep/2025 14:20:18] INFO [allianceauth.services.modules.discord.managers:118] [Discord Service] Added user Rounon_Dax with Discord ID 259357133592723456 to Discord server
[08/Sep/2025 14:20:18] INFO [allianceauth.services.modules.discord.views:89] [Discord Service] Successfully activated Discord account for user Rounon_Dax

==> myauth/log/gunicorn.log <==
[08/Sep/2025 14:20:18] INFO [allianceauth.services.modules.discord.managers:118] [Discord Service] Added user Rounon_Dax with Discord ID 259357133592723456 to Discord server
[08/Sep/2025 14:20:18] INFO [allianceauth.services.modules.discord.views:89] [Discord Service] Successfully activated Discord account for user Rounon_Dax

Well, not really. Nothing has been activated.
Is that 800429905371594752 in the links supposed to be the Discord Server ID?
If so, that's none of the servers I know and none of the IDs configured …

#

Oh wait, that's the one from my core Service server …

ivory mica
#

I'll check logs in a bit, time to head home (finally)

slow lintel
#

But not the one I'm trying to join …

ivory mica
#

Nothing in my logs about the callback...i feel like I'm missing something really obvious....

#

Ok, DISCORD_CALLBACK_URL is ignored, DMV_CALLBACK_URL works

#

buuut still nothing

ivory mica
#

Is the reserved group name list ignored by the plugin?

ivory mica
#

Anyone?

#

nevermind, I'm an idiot

slow lintel
#

Yep, can't get it to work …

#

For some reason, it grabs the wrong guild ID …

#

It has the right GuildID in the activation link:

https://aa-local.ppfeufer.de/dmv/activate/465099852573835289

It has the right GuildID in the generated Discord link:

https://discord.com/oauth2/authorize?response_type=code&client_id=redacted&redirect_uri=https%3A%2F%2Faa-local.ppfeufer.de%2Fdiscord%2Fcallback%2F&scope=identify+guilds.join&state=465099852573835289

But then somehow ignores all that and takes the one configured as DISCORD_GUILD_ID in my local.py

[10/Sep/2025 07:53:25] DEBUG [allianceauth.services.modules.discord.discord_client.client:251] [Discord Service] Returning roles for guild 800429905371594752 from cache

[10/Sep/2025 07:53:25] DEBUG [allianceauth.services.modules.discord.discord_client.client:253] [Discord Service] No roles for guild 800429905371594752 in cache

[10/Sep/2025 07:53:25] DEBUG [allianceauth.services.modules.discord.core:54] [Discord Service] Calculated roles for user Rounon_Dax: {800432143549333504, 1341898419119329412, 1342152914956980326, 1354943209842938088, 800432137013559346, 800432141103005717, 1299016695955980310, 1354932689404428540}

[10/Sep/2025 07:53:25] INFO [allianceauth.services.modules.discord.discord_client.client:667] [Discord Service] 3b2982648e1b11f08f10c87f5437bb04: sending GET request to url 'https://discord.com/api/guilds/800429905371594752/members/259357133592723456'

[10/Sep/2025 07:53:26] DEBUG [allianceauth.services.modules.discord.managers:88] [Discord Service] User Rounon_Dax with Discord ID 259357133592723456 is already a member. Forcing a Refresh
wet hill
#

Your callback is wrong

#

It's going to the discord callback not the nmv callback

slow lintel
#

Ah, I see

wet hill
#

sorry i htink you need to add the DMV callback to the discord sso client

slow lintel
#

Yep, that does the trick …

DMV_CALLBACK_URL = f"{SITE_URL}/dmv/callback/"

And add it in the Discord SSO client as well

#

Name formatting is ignored?

#

Ah no, it's an extra one

#

OK, now that it works, I like it.
Waiting patiently for the management command to migrate the core service to DMV 🙂

wet hill
#

👍

wet hill
#
(.venv) aaron@ubuntu:~/allianceauth/myauth$ python manage.py dmv_core_to_dmv
Configuring Loki Log job to: manage.py
Running checks!
Found Guild ID: 430608269988593664 - Name Sync: True
Creating Guild with ID: 430608269988593664 - Name Sync: True
Attempting to sync permissions....
Adding perms for 1 found states to the new server
Adding perms for 2 found groups to the new server
Starting migration of 1 users
Finished Migration of users, Skipped 0 users
slow lintel
#

Does it also move all groups over to be synced to mimc the core behavior?

#

Here I mean:

wet hill
#

the above script does

slow lintel
#

Perfect

wet hill
#

from that point forward it doesn't

#

i will probably add a per server setting for it

ivory mica
#

Did some more testing, dmv is still removing all discord roles from a user. Is that the inteded behaviour or should it respect the reserved group names?

slow lintel
#

Reserved groups are reserved for AA only. They should not be synced to any service

ivory mica
#

The current discord integration doesn't touch roles that are in the reserved group names

#

And I kinda expected this to work the same

slow lintel
#

Ah, that's what you mean …

ivory mica
#

Sorry if I wasn't clear. Was a bit stressfull with users crying at work and crying in discord because roles were lost

wet hill
#

can you exlain what you expect to happen?

ivory mica
#

Sure.
The User goes through the basic auth on aa, gets his corp and alliance roles there and access to the Discord Sync.
User syncs is already on the linked server and has already has several roles there already. These roles are listed in the "reserved group names" in aa.
DMV doesn't touch the asignment of these roles. Create the roles it is allowed to if needed and adds the user to them as needed.

The current discord integration already does that if i remember correctly

#

I hope this is clear. if you have any question just ping me

ivory mica
#

Anyone?

wet hill
#

Sorry missed this

#

I'm working on DMV this week. I'll have a look

#

Actually I'm doing this

ivory mica
#

Awesome, if you need someone to test hit me up!

ivory mica
#

Sooooooo? @wet hill 😛

ivory mica
#

sigh

wet hill
#

sorry mate, IRL happened

ivory mica
#

All good, i know that stuff happens

ivory mica
#

Still RL stuff?

solid badge
solid badge
solid badge
#

Looks like it works properly on join, just not on running those tasks

solid badge
#

Anyone have any ideas on it?

ivory mica
#

@wet hill (sorry for the ping but people keep pestering me for updates) Any update or still busy with RL stuff?

slate seal
#

hey, i added a new server, users can activate and get a "Your Discord account has been successfully activated" message while 1. not joined the server 2. service remains "disabled". what did i miss?