Skip to content

Audit can not retrieve users anymore #522

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

Closed
Zabuzard opened this issue Aug 22, 2022 · 1 comment · Fixed by #527
Closed

Audit can not retrieve users anymore #522

Zabuzard opened this issue Aug 22, 2022 · 1 comment · Fixed by #527
Assignees
Labels
bug Something isn't working good first issue Good for newcomers priority: major

Comments

@Zabuzard
Copy link
Member

Zabuzard commented Aug 22, 2022

The recent merge #472 messed up the ability for /audit to retrieve the actual users who used the actions against the target.

See the following example:

example

Reason

The bug comes from exchanging the previously correct

jda.retrieveUserById(action.authorId())

by the wrong

jda.getUserById(action.authorId());

Latter only checks the JDA cache instead of asking Discord. The cache is rarely reliable (only for the list of guilds).

Changing this back is fairly simple, but requires to make the code properly async using RestAction.

@Zabuzard Zabuzard added bug Something isn't working priority: major labels Aug 22, 2022
@Zabuzard
Copy link
Member Author

Zabuzard commented Aug 22, 2022

FYI @Taz03

(also, please dont forget to test on the test server before deploying, thanks)

@Zabuzard Zabuzard added the good first issue Good for newcomers label Aug 22, 2022
@Taz03 Taz03 self-assigned this Aug 22, 2022
@Taz03 Taz03 pinned this issue Aug 22, 2022
@Taz03 Taz03 removed their assignment Aug 22, 2022
@Zabuzard Zabuzard self-assigned this Aug 24, 2022
@Zabuzard Zabuzard unpinned this issue Aug 26, 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 good first issue Good for newcomers priority: major
Projects
None yet
2 participants