Skip to content

Commit

Permalink
feat: add verify command with link to the Web UI
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Dec 16, 2023
1 parent e026641 commit c0c6ccc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/api/discord/data-access/src/lib/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FindDiscordIdentityCommand } from './find-discord.command'
import { FindSolanaIdentityCommand } from './find-solana.command'
import { PingCommand } from './ping.command'
import { SyncCommand } from './sync.command'
import { VerifyCommand } from './verify.command'
import { WhoamiCommand } from './whoami.command'

export const commands = [
Expand All @@ -15,5 +16,6 @@ export const commands = [
FindDiscordIdentityCommand,
PingCommand,
SyncCommand,
VerifyCommand,
WhoamiCommand,
]
15 changes: 15 additions & 0 deletions libs/api/discord/data-access/src/lib/commands/verify.command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Injectable } from '@nestjs/common'
import { ApiCoreService } from '@pubkey-link/api/core/data-access'
import { Context, SlashCommand, SlashCommandContext } from 'necord'

@Injectable()
export class VerifyCommand {
constructor(private readonly core: ApiCoreService) {}

@SlashCommand({ name: 'verify', description: 'Verify Discord and Solana identities' })
async verify(@Context() [interaction]: SlashCommandContext) {
await interaction.reply(`Visit ${this.core.config.webUrl} to verify your Discord account and link Solana wallets.`)

return
}
}

0 comments on commit c0c6ccc

Please sign in to comment.