Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

meaning about payload parameters when sending a slash command #58

Open
XingML opened this issue Apr 19, 2023 · 0 comments
Open

meaning about payload parameters when sending a slash command #58

XingML opened this issue Apr 19, 2023 · 0 comments

Comments

@XingML
Copy link

XingML commented Apr 19, 2023

hi, I have some confusion about the payload we construct when making a slash command http request.

payload ={"type":2,"application_id":"936929561302675456","guild_id":Globals.SERVER_ID,
             "channel_id":Globals.CHANNEL_ID,"session_id":"2fb980f65e5c9a77c96ca01f2c242cf6",
             "data":{"version":"1077969938624553050","id":"938956540159881230","name":"imagine","type":1,"options":[{"type":3,"name":"prompt","value":prompt}],
                     "application_command":{"id":"938956540159881230",
                                            "application_id":"936929561302675456",
                                            "version":"1077969938624553050",
                                            "default_permission":True,
                                            "default_member_permissions":None,
                                            "type":1,"nsfw":False,"name":"imagine","description":"Create images with Midjourney",
                                            "dm_permission":True,
                                            "options":[{"type":3,"name":"prompt","description":"The prompt to imagine","required":True}]},
             "attachments":[]}}

How to set the value of "session_id" and "version" "id" in "data" ? Are they fixed as in the code?
And is there any way that MidJourney can return those information( session_id, id)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant