Feat/help thread stats by ankitsmt211 · Pull Request #1361 · Together-Java/TJ-Bot

and others added 3 commits

August 29, 2024 15:29
replaces fetching metrics directly from database instead
of discord, uses embed for showcases stats and making
duration as optional choice in terms of days

@ankitsmt211

spotless fixes, helper for calculating duration in seconds
between datetime fields to be more compliant with code quality tests
change emojis to unicode character constants with descriptive names,
single/blank line of space to be more intentional and clear

tj-wazei

@ankitsmt211

SquidXTV

…/HelpThreadStatsCommand.java


use a more simpler way to get days and a fallback if user entered option is missing

Co-authored-by: Connor Schweighöfer <squidxtv@gmail.com>

@ankitsmt211

since when saving thread meta data, participant count
excludes author which means thread with 0 participants should
be counted as ghost threads instead of single participant
to avoid users from spamming, this adds
a cooldown period of a min per channel

SquidXTV

@ankitsmt211

uses Duration instance for expiration of cache items instead
of seperate values for ease of maintenance and clarity

Zabuzard

@ankitsmt211

utf code with actual emojis for clarity,
break onSlash handler into more helpers
update helpthreadlistener to only store
true participant count in database
adds helper function in HelpThreadLifecycleListener
to get nonBot participant for database updates

@ankitsmt211

@ankitsmt211

Zabuzard