Skip to content

Commit

Permalink
feat(apps/discord-bot): add invite command (senchabot-opensource#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasitds authored Aug 1, 2023
1 parent 195d1a4 commit 9090e6e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/discord-bot/internal/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (c *commands) GetCommands() map[string]func(context context.Context, s *dis
"set": c.SetCommand,
"delete": c.DeleteCommand,
"purge": c.PurgeCommand,
"invite": c.InviteCommand,
}

return commands
Expand Down Expand Up @@ -330,6 +331,10 @@ var (
},
},
},
{
Name: "invite",
Description: "Senchabot Discord bot invite url.",
},
}
)

Expand Down
12 changes: 12 additions & 0 deletions apps/discord-bot/internal/command/invitecommand.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package command

import (
"context"

"github.com/bwmarrin/discordgo"
"github.com/senchabot-opensource/monorepo/apps/discord-bot/internal/db"
)

func (c *commands) InviteCommand(ctx context.Context, s *discordgo.Session, i *discordgo.InteractionCreate, db db.MySQL) {
ephemeralRespond(s, i, "https://discord.com/oauth2/authorize?client_id=1039550209274945587&permissions=681697203976878&scope=bot")
}

0 comments on commit 9090e6e

Please sign in to comment.