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

[BUG] Timed Message Addon (Non-Functioning) #52

Closed
ChrisLenga opened this issue Mar 15, 2022 · 14 comments
Closed

[BUG] Timed Message Addon (Non-Functioning) #52

ChrisLenga opened this issue Mar 15, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@ChrisLenga
Copy link

Describe the bug
Timed message addon doesn't appear to actually work.

To Reproduce
Nothing. Simply doesn't do anything once the channel id is added. Attempted a few small troubleshooting steps, like permissions, making a new channel, and manually restarting script. Once I have more time later, I'll dig in and see what I can find out. Nothing out of the ordinary in debug, either.

Expected behavior
Function as intended.

Screenshots
None.

Information:

  • FiveM Artifact #: 5181
  • Running QBCore?: Yes
  • If running QBCore when did you last update it? Recent. Shouldn't impact this issue.
  • Have you checked for other issues reporting this bug?: Yes. It was horribly frustrating. People need to start describing their titles.

Additional context
Once I finish a few major functions, I plan on ripping into it to see if I can find out anything. I'll report any findings here. Everything else is working as intended, such as the voice channel, status switcher, and everything else. Bot is Admin on the server with proper permissions.

@ChrisLenga ChrisLenga added the bug Something isn't working label Mar 15, 2022
@zfbx
Copy link
Owner

zfbx commented Mar 15, 2022

Silly question but did you move the timedmessages.js into /server/addons/ and when you start the bot it says something like

[zdiscord][2022-3-15 13:56:41][INF]: [ADDON] timedmessage.js addon found and loaded

@ChrisLenga
Copy link
Author

...

Yes. Its loading perfectly, just not functioning.

@ChrisLenga
Copy link
Author

Just an update -- I've tried several methods of investigation so far and nothing seems to be playing nice. Nothing in the debug side, script is definitely loading, and everything else works but this. Very odd stuff to say the least. Might toy with converting the CommonJS module over to an ES module to see if it throws any errors that is useful.

@zfbx
Copy link
Owner

zfbx commented Mar 18, 2022

Did you make any progress on this? I haven't had time to setup another server to test it yet

@ChrisLenga
Copy link
Author

Did you make any progress on this? I haven't had time to setup another server to test it yet

Not yet, sadly. I did successfully convert it over to ES, but it hasn't done much. I've been running that server for a solid day now, and thus far, nothing useful in debug either. I was expecting maybe somewhere I might get some type of error message along the way due to too many failed attempts.

Another curious thing that I'm going to look into some is the log function, as that's a relatively identical addon. I know for a fact the voice channel addon works flawlessly. Everything else is within spec and its not being rate limited, as I suspected that might be the route.

I plan on diving into that some more here shortly.

@zfbx
Copy link
Owner

zfbx commented Mar 18, 2022

The voice channel plugin is a bit more of a pain with the limit of how often you can update that within the discord api. The channel id you set for the message thing type it in chat wrapped in <#ID> so like if it was 00000 it's be <#00000> it should auto convert to a mention of the channel you want the message to send in if it's correct. I will note however that I think I voided all errors for the addons only cause I didn't want them killing the bot

@ChrisLenga
Copy link
Author

Yeah, I've found as I tinker with the voice channel bit, that it seems like a potential rate limit nightmare.

Good to know about the errors. I'll investigate that further and see.

@zfbx
Copy link
Owner

zfbx commented Mar 18, 2022

} catch {
// Just incase something unforseen happens
}

yeah this could be important lmao just through a quick log on it

} catch(e) { 
    console.log(e)
}

@ChrisLenga
Copy link
Author

Haha way ahead of you, as you had me curious. I didn't even think to check that.
image

@ChrisLenga
Copy link
Author

Removing the color function made it work immediately.

@ChrisLenga
Copy link
Author

Going to try switching it over to .setColor('#f2449e') rq

@zfbx
Copy link
Owner

zfbx commented Mar 18, 2022

Opps.. lmao yeah it's setColor xD

@ChrisLenga
Copy link
Author

Bingo! Works like a charm now.

@zfbx
Copy link
Owner

zfbx commented Mar 18, 2022

af03e96 fixed for future people xD

@zfbx zfbx closed this as completed Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants