Developer-DAO / Developer-DAO/discord-server-info
Show date of last posted message for each channel
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
As a server manager, I want to view a sortable list containing the date of the last message for each channel, so that I can identify stale channels in my server.
# How to access this data
1. [`TextChannel.lastMessage`](https://discord.js.org/#/docs/discord.js/stable/class/TextChannel?scrollTo=lastMessage) points to a text channel's last message (if it has one)
2. [`Message.createdAt`](https://discord.js.org/#/docs/discord.js/stable/class/Message?scrollTo=createdAt) is the `Date` that message was created
# How to store this data
We'll want to make this data available on channels stored in `db` so that it can later be accessed in `app`.
# How to display this data
An easy starting point for this would be to display it in a table with two columns:
- channel name ([`Channel.name`](https://discord.js.org/#/docs/discord.js/stable/class/TextChannel?scrollTo=name))
- last message date ([`Message.createdAt`](https://discord.js.org/#/docs/discord.js/stable/class/Message?scrollTo=createdAt))
These columns should be sortable (default to last message date desc?) to make it easier to find stale channels.
Contributor guide
Assessment
This issue has not been assessed yet.