-
Notifications
You must be signed in to change notification settings - Fork 7
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
Channel ID not being read from .env : Ubuntu Oracle Cloud hosted service #125
Comments
Hi I've updated the readme to include instructions for retrieving the channel ID for the .env file here. Now, there are no placeholder values for the channel ID, ensuring that it's fetched directly from the .env file during runtime. Let me know if you need further clarification or assistance |
|
Thank you for taking the time to investigate, respond and update so quickly, I really appreciate it - I spent about 5 hours trying all sorts to get it to work yesterday! Unfortunately even with the new build I am still getting the same error with the same incorrect channel ID being used. It seems to be similar to what this user is reporting in: https://stackoverflow.com/questions/69218176/env-file-not-updating-in-local-environment-in-react-js It seems like my local node installation might be faulty or have a broken cache. Even after reinstalling and purging any local node data, I am getting the same error message. I am pretty sure it is a local or user issue but if you have any other suggestions to troubleshoot, that would be great, otherwise I'll update this ticket with any progress. |
Thanks for looking into this. Let me know if you have a tip jar link somewhere for a small thank you for your time. The log outputs the correct channel ID, which indicates the .env file is being used correctly, but the script still uses the incorrect value on the GET. I have no idea what to think at this point 😄 . I tried deleting and recreating the bot, Discord server, channel, tokens etc. just in case that channel ID was encoded somewhere but I got the same result. |
if id same in .env file then idk, maybe bot dont have rights to see this channel, kick bot, reinvite with admin access link |
Cheers, attempted all that and got the same error unfortunately. The issue appears to be that the GET request is pointing to a channel ID that does not exist. It's possible this was the very first channel ID I used on my local system which has now been cached somewhere. The fact it is so persistent on a single variable is very confusing 😄 I can change the other variables (Discord token, GitHub token etc.) and have them update fine. I will try this on a different PC or VM and see if it makes any difference. |
src/discord/discordHandlers.ts after line 53 add console.log("handleThreadCreate", params.parentId); after that on every new thread create will log channel id 1st id comes from .env file |
Something wrong with terminal, its calling for someother channel_id, maybe kill all tasks (or just restart). And edited code part not same as in terminal i think, change console.log("DISCORD_CHANNEL_ID" to something else, for example console.log("TEST_DISCORD_CHANNEL_ID", guessing that from commented part, cus only this pa |
if after that works, clear all issues on github issues page, and restore all changes |
yep, reproduced problem: github issue created with bot, bot turned off, discord thread deleted, github issue still there, code fetching all issues with regex /https://discord.com/channels/(\d+)/(\d+)/(\d+)(?=))/ , then tryes to sync with discord thread part, but its not there so gives error, my bad, didn't see on prev pic ids not same |
yep, for now solution clear all github issues which created by bot, and dont delete post in discord without deleting it from github (bot will auto do that, but if off need manually delete), later will fix that to skip that issues while listing |
Thank you so much for all your time today, this will be a huge benefit to my team. If you have a tip jar then just let me know! |
nah, you welcome, thanks for reporting that bug |
Hi,
Thanks for writing this up, much appreciated.
I've managed to get this working on a free Oracle Cloud VM. Unfortunately on npm run dev I get the error below. It appears to be trying to use a different channel ID to the one I input to the config file - even changing it to a dummy value has it revert to the channel ID below. I have tried to search for references to the channel ID below but no luck.
The text was updated successfully, but these errors were encountered: