fixed /form help crashing the bot

This commit is contained in:
2024-03-17 13:31:07 +01:00
parent 6efe7e5615
commit 328d2594ea
3 changed files with 10 additions and 6 deletions

View File

@@ -57,11 +57,11 @@ func jsonStringShowModal(interaction *discordgo.Interaction, manageID string, fo
},
})
}
if overwrite[0] != "" {
if overwrite != nil && overwrite[0] != "" {
modal.Title = overwrite[0]
}
var err error
if components != nil {
if modal.Title != "" && components != nil {
err = bot.InteractionRespond(interaction, &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseModal,
Data: &discordgo.InteractionResponseData{