Skip to content

✨ tweak: explicitly set bot to online with few other changes #5

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

Merged
merged 3 commits into from
Mar 31, 2025

Conversation

petesiki
Copy link
Contributor

@petesiki petesiki commented Mar 31, 2025

This pull request includes several changes to improve the functionality and configuration of the project. The most important changes include updates to the webhook URL in the README.md, the addition of a new dependency in package.json, setting the bot's status explicitly in src/events/ready.js, and changing the default port in src/index.js.

Configuration updates:

  • README.md: Updated the webhook URL to http://<YOUR_PUBLIC_URL>:3000/webhook/unthread to correct the path.
  • src/index.js: Changed the default port from 5000 to 3000 to align with the expected configuration.

Dependency management:

  • package.json: Added the cacheable dependency to the project.

Bot functionality:

  • src/events/ready.js: Added code to explicitly set the bot's status to 'online' to ensure it appears online to users.

Copy link
Member

@warengonzaga warengonzaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the changes are good. LGTM.

@warengonzaga warengonzaga added tweak Enhancements (Issue/PR) docs Project Documentation (Issue/PR) fix Bug Fix (PR) labels Mar 31, 2025
@warengonzaga warengonzaga merged commit de084ff into wgtechlabs:dev Mar 31, 2025
@warengonzaga warengonzaga changed the title Bug/set bot online ✨ tweak: explicitly set bot to online with few other changes Mar 31, 2025
@petesiki
Copy link
Contributor Author

petesiki commented Apr 1, 2025

Overall, the changes are good. LGTM.

Thanks @warengonzaga . Have you been able to successfully post to unthread? I've wired everything up but keep getting a 500 when I try to send to unthread. that's the only missing part of the pipeline for me right now.

@warengonzaga
Copy link
Member

Overall, the changes are good. LGTM.

Thanks @warengonzaga . Have you been able to successfully post to unthread? I've wired everything up but keep getting a 500 when I try to send to unthread. that's the only missing part of the pipeline for me right now.

Are you referring to sending a message from Unthread to Discord? Or Discord to Unthread? Actually the latest version is tested and it is working in my setup. Did you provide all the credentials needed including adding the webhook to the Unthread settings?

@warengonzaga
Copy link
Member

Otherwise, you can try this @petesiki
https://railway.com/template/nVHIjj

It is not yet final, but it can help you to get started.

@petesiki
Copy link
Contributor Author

petesiki commented Apr 1, 2025

Overall, the changes are good. LGTM.

Thanks @warengonzaga . Have you been able to successfully post to unthread? I've wired everything up but keep getting a 500 when I try to send to unthread. that's the only missing part of the pipeline for me right now.

Are you referring to sending a message from Unthread to Discord? Or Discord to Unthread? Actually the latest version is tested and it is working in my setup. Did you provide all the credentials needed including adding the webhook to the Unthread settings?

I'm able to see logs from unthread -> discord, prints the events that are coming in that way, so i think webhook is set up successfully. The issue is from discord -> unthread something in the API call to createTicket is failing. I don't think its an issue with my settings and env vars. If you've tested and confirm it works, i'll try again

@petesiki
Copy link
Contributor Author

petesiki commented Apr 1, 2025

Overall, the changes are good. LGTM.

Thanks @warengonzaga . Have you been able to successfully post to unthread? I've wired everything up but keep getting a 500 when I try to send to unthread. that's the only missing part of the pipeline for me right now.

Are you referring to sending a message from Unthread to Discord? Or Discord to Unthread? Actually the latest version is tested and it is working in my setup. Did you provide all the credentials needed including adding the webhook to the Unthread settings?

I'm able to see logs from unthread -> discord, prints the events that are coming in that way, so i think webhook is set up successfully. The issue is from discord -> unthread something in the API call to createTicket is failing. I don't think its an issue with my settings and env vars. If you've tested and confirm it works, i'll try again

also just tried railway and running into this error deploying. mind having a look?
Screenshot 2025-04-01 at 1 26 21 PM

@warengonzaga
Copy link
Member

@petesiki, that's interesting. What's your Discord username? I will add you and we can discuss this via Discord. I will help you to make this work.

@warengonzaga
Copy link
Member

I'm able to see logs from unthread -> discord, prints the events that are coming in that way, so i think webhook is set up successfully. The issue is from discord -> unthread something in the API call to createTicket is failing. I don't think its an issue with my settings and env vars. If you've tested and confirm it works, i'll try again

Is it the creation of the ticket? I tested it today and it works as expected.
image

Also, can you create an issue regarding this I would like to debug this more. @petesiki

@petesiki
Copy link
Contributor Author

petesiki commented Apr 2, 2025

@petesiki, that's interesting. What's your Discord username? I will add you and we can discuss this via Discord. I will help you to make this work.

peter_33120 . talk to you soon!

@petesiki petesiki deleted the bug/set-bot-online branch April 2, 2025 15:23
@warengonzaga
Copy link
Member

@petesiki, that's interesting. What's your Discord username? I will add you and we can discuss this via Discord. I will help you to make this work.

peter_33120 . talk to you soon!

Added you on Discord, let me know when you received it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Project Documentation (Issue/PR) fix Bug Fix (PR) tweak Enhancements (Issue/PR)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants