You've already forked AstralRinth
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user