@@ -15,22 +15,16 @@ GNU General Public License for more details.
1515You should have received a copy of the GNU General Public License
1616along with this program. If not, see <https://www.gnu.org/licenses/>.
1717*/
18- use std:: collections:: { HashMap , HashSet } ;
19- use std:: time:: Duration ;
18+ use std:: collections:: HashMap ;
2019
21- use chrono:: DateTime ;
22- use serenity:: all:: {
23- CacheHttp , ChannelId , Context , CreateEmbed , CreateMessage , GetMessages , Message ,
24- } ;
20+ use serenity:: all:: { CacheHttp , ChannelId , Context , CreateEmbed , CreateMessage } ;
2521use serenity:: async_trait;
2622use tracing:: instrument;
2723
2824use super :: Task ;
2925use crate :: graphql:: models:: Member ;
3026use crate :: graphql:: GraphQLClient ;
31- use crate :: ids:: {
32- AI_CHANNEL_ID , MOBILE_CHANNEL_ID , STATUS_UPDATE_CHANNEL_ID , SYSTEMS_CHANNEL_ID , WEB_CHANNEL_ID ,
33- } ;
27+ use crate :: ids:: STATUS_UPDATE_CHANNEL_ID ;
3428use crate :: utils:: time:: time_until;
3529
3630/// Checks for status updates daily at 5 AM.
@@ -54,12 +48,6 @@ impl Task for StatusUpdateReport {
5448
5549type GroupedMember = HashMap < Option < String > , Vec < Member > > ;
5650
57- struct ReportConfig {
58- time_valid_from : DateTime < chrono_tz:: Tz > ,
59- keywords : Vec < & ' static str > ,
60- special_authors : Vec < & ' static str > ,
61- }
62-
6351#[ instrument( level = "debug" , skip( ctx) ) ]
6452pub async fn status_update_check ( ctx : Context , client : GraphQLClient ) -> anyhow:: Result < ( ) > {
6553 let now = chrono:: Utc :: now ( ) . with_timezone ( & chrono_tz:: Asia :: Kolkata ) ;
@@ -80,16 +68,6 @@ pub async fn status_update_check(ctx: Context, client: GraphQLClient) -> anyhow:
8068 Ok ( ( ) )
8169}
8270
83- // TODO: Replace hardcoded set with configurable list
84- fn get_channel_ids ( ) -> Vec < ChannelId > {
85- vec ! [
86- ChannelId :: new( SYSTEMS_CHANNEL_ID ) ,
87- ChannelId :: new( MOBILE_CHANNEL_ID ) ,
88- ChannelId :: new( WEB_CHANNEL_ID ) ,
89- ChannelId :: new( AI_CHANNEL_ID ) ,
90- ]
91- }
92-
9371fn categorize_members ( members : & Vec < Member > ) -> GroupedMember {
9472 let mut naughty_list: HashMap < Option < String > , Vec < Member > > = HashMap :: new ( ) ;
9573
0 commit comments