Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cURL issue #45

Open
TheAFKGamer10 opened this issue Jul 9, 2023 · 8 comments
Open

cURL issue #45

TheAFKGamer10 opened this issue Jul 9, 2023 · 8 comments

Comments

@TheAFKGamer10
Copy link

When I try and publish the commands, I get the error

curl: (3) URL using bad/illegal format or missing URL
-H: command not found
-bash: https://discord.com/api/v9/applications/1127419979621466122/commands: No such file or directory

I have the token and app id set, I am wondering if it has something to do with the -H "Authorization: Bot $token" \ part because it says its on line 3.
Does anyone else have this issue and any idea on how to solve it.
Thanks.

@JohnnyJayJay
Copy link
Owner

Hi, it seems like you're running each line individually rather than running them in a single command. Can you send the full interaction (input and output) from your console?

Also, I noticed that I forgot to update the commands.json file in a while. I might just make this process a little easier overall and remove the requirement to send a request manually.

@TheAFKGamer10
Copy link
Author

wget https://github.com/JohnnyJayJay/instant-poll/blob/main/command.json
token="*thebottoken*"
appid="1127419979621466122"
curl -d "@command.json" \ 
     -H "Content-Type: application/json" \
     -H "Authorization: Bot $token" \ 
     https://discord.com/api/v9/applications/$appid/commands
--2023-07-10 13:31:50--  https://github.com/JohnnyJayJay/instant-poll/blob/main/command.json
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11969 (12K) [text/plain]
Saving to: ‘command.json’

command.json    100%[======>]  11.69K  --.-KB/s    in 0.03s   

2023-07-10 13:31:51 (446 KB/s) - ‘command.json’ saved [11969/11969]

curl: (3) URL using bad/illegal format or missing URL
-H: command not found
-bash: https://discord.com/api/v9/applications/1127419979621466122/commands: No such file or directory

@JohnnyJayJay
Copy link
Owner

Hi! Could you try the new hosting instructions? I've hopefully made it easier to update the slash commands and everything is up to date now, too. You can find everything in the README.

@TheAFKGamer10
Copy link
Author

TheAFKGamer10 commented Jul 13, 2023

On this command there is an extra ` make sure to remove it

docker compose run -e UPDATE_COMMANDS=1 server`

@TheAFKGamer10
Copy link
Author

I am also having the problem

docker compose up
[+] Running 1/0
 ✔ Container instant-poll-server-1  Created               0.0s 
Attaching to instant-poll-server-1
instant-poll-server-1  | Jul 13, 2023 5:27:37 PM clojure.tools.logging$eval136$fn__139 invoke
instant-poll-server-1  | INFO: Starting instant-poll
instant-poll-server-1  | Jul 13, 2023 5:27:37 PM clojure.tools.logging$eval136$fn__139 invoke
instant-poll-server-1  | INFO: Starting messaging process

I have had this waiting for 2 hours and the bot is not online, the webserver is not up and the bot will not respond to commands.
Any other help with this?

@JohnnyJayJay
Copy link
Owner

I am also having the problem

docker compose up
[+] Running 1/0
 ✔ Container instant-poll-server-1  Created               0.0s 
Attaching to instant-poll-server-1
instant-poll-server-1  | Jul 13, 2023 5:27:37 PM clojure.tools.logging$eval136$fn__139 invoke
instant-poll-server-1  | INFO: Starting instant-poll
instant-poll-server-1  | Jul 13, 2023 5:27:37 PM clojure.tools.logging$eval136$fn__139 invoke
instant-poll-server-1  | INFO: Starting messaging process

I have had this waiting for 2 hours and the bot is not online, the webserver is not up and the bot will not respond to commands.
Any other help with this?

There is no warning/error message indicated here. Have you set up the interactions endpoint in the developer portal? How do you test if the web server is up?

@TheAFKGamer10
Copy link
Author

I fixed it, I added the extended port in the docker compose file and that fixed the problem. You might want to put this in the docker compose file from the start .

    ports:
      - "8090:8090"

@JohnnyJayJay
Copy link
Owner

I fixed it, I added the extended port in the docker compose file and that fixed the problem. You might want to put this in the docker compose file from the start .

    ports:
      - "8090:8090"

It says that the host port will be picked by Docker by default and that you have to change this if you have a specific port you want to use. I don't want to impose a specific port on users, but I suppose I could give a default

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

No branches or pull requests

2 participants