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 17:33:07 +00:00
committed by GitHub
parent bc5a761312
commit 543d25e2d6
20 changed files with 726 additions and 59 deletions
@@ -0,0 +1,37 @@
<script setup lang="ts">
import { Button, Heading, Section, Text } from '@vue-email/components'
import StyledEmail from '../shared/StyledEmail.vue'
</script>
<template>
<StyledEmail
title="You're invited to the Creator Club"
:manual-links="[{ link: '{discord.link_url}', label: 'Link Discord' }]"
>
<Heading as="h1" class="mb-2 text-2xl font-bold">You're invited to the Creator Club</Heading>
<Text class="text-base">Hey <span class="no-auto-link">{user.name}</span>!</Text>
<Text class="text-base"> Your projects just passed 20,000 total downloads, nice! </Text>
<Text class="text-base">
We want to invite you to Modrinth's Creator Club, a space in our discord where you can chat
with other creators, share feedback with us, and stay plugged in.
</Text>
<Text class="text-base">
To join just link your Discord account through Modrinth and we'll grant access automatically!
</Text>
<Section class="mb-4 mt-4">
<Button
href="{discord.link_url}"
target="_blank"
class="text-accentContrast inline-block rounded-[12px] bg-brand pb-3 pl-4 pr-4 pt-3 text-[14px] font-bold"
>
Join the Creator Club
</Button>
</Section>
</StyledEmail>
</template>
@@ -36,6 +36,9 @@ export default {
'server-invited': () => import('./server/ServerInvited.vue'),
'server-invited-no-account': () => import('./server/ServerInvitedNoAccount.vue'),
// Discord
'discord-role-creator-club': () => import('./discord/DiscordRoleCreatorClub.vue'),
// Organizations
'organization-invited': () => import('./organization/OrganizationInvited.vue'),
} as Record<string, () => Promise<{ default: Component }>>