Skip to content

Commit

Permalink
fix: rename env name application id (#1227)
Browse files Browse the repository at this point in the history
  • Loading branch information
phucledien authored Nov 9, 2023
1 parent 92e4261 commit bc60715
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ type Config struct {
CovalentBaseUrl string
CovalentAPIKeys []string

DiscordToken string
DiscordApplicationID string
DiscordToken string
ApplicationID string

RedisURL string

Expand Down Expand Up @@ -248,8 +248,8 @@ func generateConfigFromViper(v *viper.Viper) Config {
CovalentBaseUrl: v.GetString("COVALENT_BASE_URL"),
CovalentAPIKeys: strings.Split(v.GetString("COVALENT_API_KEYS"), ","),

DiscordToken: v.GetString("DISCORD_TOKEN"),
DiscordApplicationID: v.GetString("DISCORD_APPLICATION_ID"),
DiscordToken: v.GetString("DISCORD_TOKEN"),
ApplicationID: v.GetString("APPLICATION_ID"),

InDiscordWalletMnemonic: v.GetString("IN_DISCORD_WALLET_MNEMONIC"),
VaultMnemonic: v.GetString("VAULT_MNEMONIC"),
Expand Down
2 changes: 1 addition & 1 deletion pkg/entities/command_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (e *Entity) GetInstallBotUrl() (string, error) {
finalPermission = finalPermission.Or(finalPermission, flag)
}

installBotUrl := fmt.Sprintf("https://discord.com/api/oauth2/authorize?client_id=%s&permissions=%s&scope=bot applications.commands", e.cfg.DiscordApplicationID, finalPermission.String())
installBotUrl := fmt.Sprintf("https://discord.com/api/oauth2/authorize?client_id=%s&permissions=%s&scope=bot applications.commands", e.cfg.ApplicationID, finalPermission.String())

return installBotUrl, nil
}

0 comments on commit bc60715

Please sign in to comment.