Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
inciner8r committed Jan 4, 2024
1 parent 0eec74b commit b003c72
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions app/handlers/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func Generate(prompt string, sess_id string, nonce string) {
"channel_id": "` + channel_id + `",
"session_id": "` + sess_id + `",
"data": {
"version": "1118961510123847772",
"version": "1166847114203123795",
"id": "938956540159881230",
"name": "imagine",
"type": 1,
Expand All @@ -35,25 +35,29 @@ func Generate(prompt string, sess_id string, nonce string) {
}],
"application_command": {
"id": "938956540159881230",
"type":1,
"application_id": "936929561302675456",
"version": "1118961510123847772",
"default_member_permissions": null,
"type": 1,
"nsfw": false,
"version": "1166847114203123795",
"name": "imagine",
"description": "Create images with Midjourney",
"dm_permission": true,
"contexts": [0, 1, 2],
"options": [{
"type": 3,
"name": "prompt",
"description": "The prompt to imagine",
"required": true
}]
"required": true,
"description_localized": "The prompt to imagine",
"name_localized": "prompt"
}],
"integration_types": [
0
],
"description_localized": "Create images with Midjourney",
"name_localized": "imagine"
},
"attachments": []
},
"nonce": "` + nonce + `"
"nonce": "` + nonce + `",
"analytics_location": "slash_ui"
}`
fmt.Println("request json:", jsonStr)
req, err := http.NewRequest(http.MethodPost, url, strings.NewReader(jsonStr))
Expand Down

0 comments on commit b003c72

Please sign in to comment.