Skip to content

Commit

Permalink
dont use any discordgo components
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuetler committed Mar 29, 2024
1 parent 3cd0283 commit 2b6ecc4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pkg/controller/DiscordController.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab

if !shortCard {
// Available VLANs
var vlanRow discordgo.ActionsRow
// var vlanRow discordgo.ActionsRow
vlansMissing := false
if len(user.Sessions) > 0 {
switchIP := user.Sessions[0].SwitchIP
Expand Down Expand Up @@ -263,6 +263,7 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
*/
}
} else {
log.Debug("vlan is missing")
vlansMissing = true
}

Expand Down Expand Up @@ -295,16 +296,20 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
}

if !vlansMissing {
card.Components = append(card.Components, vlanRow)
/*
card.Components = append(card.Components, vlanRow)
*/
actions = append(actions, discordgo.Button{
Label: "Cancel",
Style: discordgo.SecondaryButton,
Disabled: !buttonsEnabled,
CustomID: "findCancelBtn",
})
card.Components = append(card.Components, discordgo.ActionsRow{
Components: actions,
})
/*
card.Components = append(card.Components, discordgo.ActionsRow{
Components: actions,
})
*/
}
}

Expand Down

0 comments on commit 2b6ecc4

Please sign in to comment.