Blumlaut / EasyAdmin

Admin Menu for FiveM and RedM
https://easyadmin.readthedocs.io/
GNU Affero General Public License v3.0
172 stars 156 forks source link

7.0.1 #722

Closed adorne1 closed 1 year ago

adorne1 commented 1 year ago

Describe the issue After 7.0.1 discord integration works fine, however following the update my console is printing a new error, and not posting certain logs.. currently the only log i can get to print anything to discord is calladmin logs, these reset after each server restart as well. The error is pasted below.

Attempted Solutions Reinstall, reconfigured bot, cleared EA config.

Screenshots/Logs image Whats shows up below the error is simply me resetting the configuration for the calladmin log, further more - when a player is dropped, the same error is shown but instead of 'send' it shows 'edit.' See Below image

Server Infos (please complete the following information):

Additional context N/A

adorne1 commented 1 year ago

Sorry for being back so soon lol..

Blumlaut commented 1 year ago

one of your configured channels is invalid

adorne1 commented 1 year ago

image I've wiped my config so that i exclusively can test channel by channel - i can not see how a channel is invalid when done this way.

See config: image

Blumlaut commented 1 year ago

does the bot have read and write permissions for the channel?

adorne1 commented 1 year ago

does the bot have read and write permissions for the channel?

I've given the bot administrator since I thought that could be an issue as well, yes, the bot can see and read the channel.

Blumlaut commented 1 year ago

https://github.com/Blumlaut/EasyAdmin/blob/master/server/bot/reports.js#L40

channel is fetched from cache, maybe try sending a message into the channel and see if the bot picks the channel up from there?

adorne1 commented 1 year ago

Doesn't seem to be working either, I'm clearing my cache atm, i'll let you know if that works. But it might be an issue with channel or message object. It only stops working everytime i restart EA.

Blumlaut commented 1 year ago

that'd point at it being a cache issue indeed, what happens if you replace client.channels.cache.get with client.channels.fetch on lines 36-41?

adorne1 commented 1 year ago

Didnt do anything, still logged it to my config, just didnt print anything to the discord. after restarting the resource

Blumlaut commented 1 year ago

... and the console?

adorne1 commented 1 year ago

Same exact message.

adorne1 commented 1 year ago

Uh, didnt scroll lol.. image

adorne1 commented 1 year ago

Going to clear my cache again, and redo the process with the edited stuff since it still thinks that the channel does not exist/is invalid

Blumlaut commented 1 year ago

404 not found = discord API error, channel unknown, not an EasyAdmin issue.