continued porting to disgo...

This commit is contained in:
2024-04-09 23:21:08 +02:00
parent 01ac1ec363
commit b7f126efba
10 changed files with 284 additions and 379 deletions

15
tool.go
View File

@@ -36,6 +36,21 @@ type MessageIDs struct {
ChannelID string
}
func noNullString(in interface{}) string {
var s string = ""
var is_str bool
switch in.(type) {
case string:
is_str = true
case *string:
is_str = true
}
if in != nil && is_str {
s = fmt.Sprint(in)
}
return s
}
func jsonStringShowModal(userID string, manageID string, formID string, overwrite ...string) discord.InteractionResponse {
var modal ModalJson = getModalByFormID(formID)
var components []discord.ContainerComponent