Commit d0a845b
authored
feat: add /repel command to timeout users and delete recent mesages (#11)
* 🌟 feat: Add buildCommandString function to format command strings
* 🌟 feat: Implement getPublicChannels function to filter accessible text channels
* 🌟 feat: Add fetchAndCachePublicChannelsMessages function to cache messages from public channels
* 🌟 feat: Implement timeToString function to format milliseconds into readable time
* 🌟 feat: Add cache-messages command to cache messages in all public text channels
* 🌟 feat: Add force re-caching option to cache-messages command
* 🌟 feat: Add new config variables (repel, server Id, moderator role Ids and cache on start)
* 🌟 feat: Fetch and cache messages on client ready event
* 🌟 feat: Implement repel command to timeout users and delete recent messages
* 🌟 feat: Add cacheMessages and repelCommand to commands map
* 🔨 refactor: remove FETCH_AND_SYNC_MESSAGES from env and put it directly in the config
* 🔨 refactor: remove unnecessary `return` from cache-messages command handler
* 🌟 feat: add error logging for target fetching and timeout functions
* 🌟 feat: replace Promis.all with Promise.allSettled and track/log failed channels in message deletion function
* 🌟 feat: enhance message caching by tracking failed channels and using Promise.allSettled
* 🐛 fix: fix missing } after resolving merge conflicts1 parent 9007901 commit d0a845b
File tree
10 files changed
+602
-9
lines changed- src
- commands
- moderation
- constants
- events
- util
10 files changed
+602
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments