Support persistent member mention after member leaves guild. (member.id.user) #41

Closed
opened 2026-02-15 23:16:20 -05:00 by yindo · 5 comments
Owner

Originally created by @BoQsc on GitHub (Oct 30, 2024).

Describe the bug
As you might know, after a guild member leaves your guild; and you refresh your web browser, you are left with nothing but a weird mention handle.
Image

To resolve this, on revolt.js project we would use member.id.user:

await targetChannel.sendMessage("<@" + member.id.user + ">" + `Left the server.`);

Image

However member.id.user is clearly not existant in revolt.py and I wonder how to achieve the same result here.

Originally created by @BoQsc on GitHub (Oct 30, 2024). **Describe the bug** As you might know, after a guild member **leaves your guild**; and you **refresh your web browser**, you are **left with nothing but a weird mention handle**. ![Image](https://github.com/user-attachments/assets/ceaec7bb-cc66-452f-aded-d07d1bbb3a5e) To resolve this, on **revolt.js project** we would use [`member.id.user`](https://revolt.js.org/classes/ServerMember.html#id): ``` await targetChannel.sendMessage("<@" + member.id.user + ">" + `Left the server.`); ``` ![Image](https://github.com/user-attachments/assets/c8059fad-b014-465b-9fda-6a7cbc3dd5ab) However `member.id.user` is clearly not existant in **revolt.py** and I wonder how to achieve the same result here.
yindo added the invalid label 2026-02-15 23:16:20 -05:00
yindo closed this issue 2026-02-15 23:16:20 -05:00
Author
Owner

@Zomatree commented on GitHub (Oct 30, 2024):

The user id is used in both libraries and are the exact same, it depends on whether the user's client has the user cached or not, if there is no shared servers or relationship then they won't them cached, this is not something which can be changed library side, the same would happen in revolt.js as well if they are no longer cached.

@Zomatree commented on GitHub (Oct 30, 2024): The user id is used in both libraries and are the exact same, it depends on whether the user's client has the user cached or not, if there is no shared servers or relationship then they won't them cached, this is not something which can be changed library side, the same would happen in revolt.js as well if they are no longer cached.
Author
Owner

@BoQsc commented on GitHub (Oct 30, 2024):

@Zomatree Have you tested the suggested code line in a revolt.js project?

await targetChannel.sendMessage("<@" + member.id.user + ">" + Left the server.);

@BoQsc commented on GitHub (Oct 30, 2024): @Zomatree Have you tested the suggested code line in a revolt.js project? > await targetChannel.sendMessage("<@" + member.id.user + ">" + `Left the server.`);
Author
Owner

@Zomatree commented on GitHub (Oct 31, 2024):

The ID is the exact same, the user ID is used in both.

@Zomatree commented on GitHub (Oct 31, 2024): The ID is the exact same, the user ID is used in both.
Author
Owner

@BoQsc commented on GitHub (Oct 31, 2024):

@Zomatree No, I only asked you to answer if you tested it yourself or not. I'm aware of what you are saying. I seem to be getting different results than what you are explaining. The main post still stands as working and result is different than regular user ID, even if it's same ID, there might be something that do allow member.id.user to keep minimal cache of the user. The mention if clicked: It might no longer show the the most recent profile information, but all other cached data is left as available and mention still keeps on working after guild member leaves.
It keeps on showing member mention, even if they are no longer a friend or related.

@BoQsc commented on GitHub (Oct 31, 2024): @Zomatree No, I only asked you to answer if you tested it yourself or not. I'm aware of what you are saying. I seem to be getting different results than what you are explaining. The main post still stands as working and result is different than regular user ID, even if it's same ID, there might be something that do allow `member.id.user` to keep minimal cache of the user. The mention if clicked: It might no longer show the the most recent profile information, but all other cached data is left as available and mention still keeps on working after guild member leaves. It keeps on showing member mention, even if they are no longer a friend or related.
Author
Owner

@Zomatree commented on GitHub (Nov 1, 2024):

This is dependant on the clients cache not anything to do with the library, I cannot control it nor can revolt.js

@Zomatree commented on GitHub (Nov 1, 2024): This is dependant on the clients cache not anything to do with the library, I cannot control it nor can revolt.js
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/python-client-sdk#41