Ban reasons are no longer showing up in audit logs
I’m using djs v14. Previously, ban reasons would show up in the server’s audit logs as expected. However, this functionality seems to have stopped working out of nowhere. At the time it stopped working, no code changes were made nor has my bot restarted. Has anyone else been experiencing similar issues? (It isn’t just bans, it is anything that supports an audit log reason)
24 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!they are not appearing in the client, nor are other bots able to see them. they are also no longer appearing in the bans tab
the ban gets created as expected, just the reason doesn't work
anymore*
very weird. i can try to create a minimal reproduction and work from there i suppose
i noticed that, just haven't gotten around to changing it yet. i can't see why that would cause this issue but i will test for it anyway
it isn't just bans, the same happens with timeouts etc
I am not, they are also truncated (if the user inputs a long value of course)
???
i'm so confused wtf
worked fine in the attempt at reproducing the issue
not the actual instance of my bot
same test server, same test bot, just the code is different
indeed
ok it still didn't work but there's something else I want to test now
I'm running an instance of @discordjs/proxy for my actual bot and I have a sneaking suspicion that it may be stripping the header or something
I'm going to try changing my minimal repro to use a proxy
IT IS
wtf
this is my code using /proxy, it is very much based off of proxy-container, I just wanted a bit more control over the node version etc, and the ability to run it on an arm64 host:
only other change needed to this was the option to use the proxy:
looks like it's /proxy unless I've screwed something up here
I think this is a bug in @discordjs/proxy yeah
it looks like it's ignoring the X-Audit-Log-Reason header
yep
that was the issue
adding these lines to proxyRequests fixed it
I'll make a PR
created the PR https://github.com/discordjs/discord.js/pull/9889
so just adding an
as string
?seems to have suppressed the error
ffs
can I just remove this
lmfao
probably because i just npm install'd and ran with it
i didn't have pnpm
yeah no
i didn't have pnpm installed before
i did yeah
kinda wishing i did
that npm install took forever
finally
fixed it and force pushed
yippee
yeah
proxy container gets a new latest every 12h
so should be fixed soon
and proxy itself? is this going to be a standalone release or released with new features (noticed it was assigned the 2.1.0 milestone instead of a 2.0.2)
idk
@jiralite manages milestones
usually we make minors by default anyway
and adjust before release
i think
alright
how often do new releases for proxy come out? undecided if I should just use patch-package in the meantime
12h like all packages