feat: use discord_id from discord sso for role grant (#6326)

* feat: properly use labrinth's linked discord accts sso for discord bot

* Update email for fixture user in SQL insert

Signed-off-by: Calum H. <calum@modrinth.com>

* fix: rev changes

* fix: copy on email

* fix: lint

* fix: rev

* fix: lint

---------

Signed-off-by: Calum H. <calum@modrinth.com>
This commit is contained in:
Calum H.
2026-06-09 18:33:07 +01:00
committed by GitHub
parent bc5a761312
commit 543d25e2d6
20 changed files with 726 additions and 59 deletions
@@ -29,4 +29,18 @@ export class LabrinthAuthInternalModule extends AbstractModule {
method: 'POST',
})
}
/**
* Create a signed Discord community bot handoff URL
*/
public async createDiscordCommunityLink(): Promise<Labrinth.Auth.Internal.DiscordCommunityLinkResponse> {
return this.client.request<Labrinth.Auth.Internal.DiscordCommunityLinkResponse>(
'/auth/discord-community-link',
{
api: 'labrinth',
version: 'internal',
method: 'POST',
},
)
}
}
@@ -510,6 +510,10 @@ export namespace Labrinth {
export type SubscriptionStatus = {
subscribed: boolean
}
export type DiscordCommunityLinkResponse = {
url: string
}
}
export namespace v2 {