-
Notifications
You must be signed in to change notification settings - Fork 5
[v1.2.0] user ttls & message ids cache #47
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
base: v1
Are you sure you want to change the base?
Conversation
|
Can Discord retrieve messages using their ID, even after they've been deleted? |
hallo @7f8ddd, thx for the tip (≧ᗜ≦)ᡣ𐭩
you're best asking discord privacy for that .. i can't give any official answers (´• ω •`); this is a hobby project that is not endorsed by discord. it is being made for my own use ( |
fe50e49 to
4ef7899
Compare
d479536 to
b2547e6
Compare
|
dont worry guys one day ill finish this slowly but surely =w= |
|
|
||
| try { | ||
| const messageIdsMetadata = await getMessageIdsMetadata(serverId, channelId); | ||
| if (isAfterBotStartup(messageIdsMetadata.lastBackfilledMessageId)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i should move this up and add a more clear log
| } | ||
|
|
||
| public static fromMessageData(data: MessageIdsData): Message { | ||
| return new Message(data.serverId, data.channelId, data.messageId, data.authorId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i should add the pin check here.
for ex:
- cache pins somewhere in a set on startup & on pin update events(?) (is that a thing?)
- upon creating a new msg object, check if the pin cache set has the message id
- setPinned if so
v1.2.0 will include a cache which will store message ids in order to save on requests to the discord api ૮ ˶ᵔ ᵕ ᵔ˶ ა
this will also allow for user-specific ttls, which are implemented here too~
note: the messages database will only contain ids; no message content will ever be stored by discord ttl