-
Notifications
You must be signed in to change notification settings - Fork 3
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
Todo: logging #12
Comments
Discord provides the message that was deleted along with the message edits. Message update provides two responses: {
"channelId": "1012849719241883788",
"guildId": "1007457740655968327",
"id": "1082407022361850067",
"createdTimestamp": 1678136344281,
"type": 0,
"system": false,
"content": "hello world!",
"authorId": "455428041586376729",
"pinned": false,
"tts": false,
"nonce": "1082407016984477696",
"embeds": [],
"components": [],
"attachments": [],
"stickers": [],
"position": null,
"editedTimestamp": null,
"mentions": {
"everyone": false,
"users": [],
"roles": [],
"crosspostedChannels": [],
"repliedUser": null,
"members": [],
"channels": []
},
"webhookId": null,
"groupActivityApplicationId": null,
"applicationId": null,
"activity": null,
"flags": 0,
"reference": null,
"interaction": null,
"cleanContent": "hello world!"
} New content: {
"channelId": "1012849719241883788",
"guildId": "1007457740655968327",
"id": "1082407022361850067",
"createdTimestamp": 1678136344281,
"type": 0,
"system": false,
"content": "Hello World!",
"authorId": "455428041586376729",
"pinned": false,
"tts": false,
"nonce": "1082407016984477696",
"embeds": [],
"components": [],
"attachments": [],
"stickers": [],
"position": null,
"editedTimestamp": 1678136352029,
"mentions": {
"everyone": false,
"users": [],
"roles": [],
"crosspostedChannels": [],
"repliedUser": null,
"members": [],
"channels": []
},
"webhookId": null,
"groupActivityApplicationId": null,
"applicationId": null,
"activity": null,
"flags": 0,
"reference": null,
"interaction": null,
"cleanContent": "Hello World!"
} And message deletions also send the content in: {
"channelId": "1012849719241883788",
"guildId": "1007457740655968327",
"id": "1082407022361850067",
"createdTimestamp": 1678136344281,
"type": 0,
"system": false,
"content": "Hello World!",
"authorId": "455428041586376729",
"pinned": false,
"tts": false,
"nonce": "1082407016984477696",
"embeds": [],
"components": [],
"attachments": [],
"stickers": [],
"position": null,
"editedTimestamp": 1678136352029,
"mentions": {
"everyone": false,
"users": [],
"roles": [],
"crosspostedChannels": [],
"repliedUser": null,
"members": [],
"channels": []
},
"webhookId": null,
"groupActivityApplicationId": null,
"applicationId": null,
"activity": null,
"flags": 0,
"reference": null,
"interaction": null,
"cleanContent": "Hello World!"
} |
See |
That's actually a cache thing! On Message Update, Discord provides the same data as the Message Create event. On Message Delete it provides even less. It's nice that this data could be cached, but I wouldn't depend on it. A separate message cache should be implemented somehow. |
Includes message logging (edits & deletes) and user logging.
Message logging will require storing a cache of sent messages. Both will require storing some settings for each guild (think log channel).
The text was updated successfully, but these errors were encountered: