@@ -20,28 +20,25 @@ pub async fn entrypoint() {
2020 // fetch the config
2121 let cfg = scripty_config:: get_config ( ) ;
2222
23- // initialize the blocked entity list
24- info ! ( "fetching blocked entities" ) ;
25- scripty_bot_utils:: entity_block:: init_blocked ( )
26- . await
27- . expect ( "failed to init blocked entities" ) ;
28-
2923 // initialize the framework
24+ info ! ( "loading framework" ) ;
3025 let framework = FrameworkBuilder :: default ( )
3126 . options ( framework_opts:: get_framework_opts ( ) )
3227 . build ( ) ;
28+ info ! ( "setting global data" ) ;
3329 let data = Arc :: new ( Data :: new ( ) ) ;
3430 if CLIENT_DATA . set ( data. clone ( ) ) . is_err ( ) {
3531 unreachable ! ( "client data set more than once: bug?" )
3632 }
3733
34+ info ! ( "initializing songbird" ) ;
3835 let songbird = scripty_audio_handler:: Songbird :: serenity_from_config (
3936 scripty_audio_handler:: get_songbird_config ( ) ,
4037 ) ;
4138 scripty_audio_handler:: set_songbird ( songbird. clone ( ) ) ;
4239
40+ info ! ( "initializing HTTP client" ) ;
4341 let token = Token :: from_str ( & cfg. tokens . discord ) . expect ( "failed to parse token" ) ;
44-
4542 let mut http = serenity:: http:: HttpBuilder :: new ( token. clone ( ) ) ;
4643 if let Some ( proxy) = & cfg. proxy {
4744 http = http. proxy ( proxy) . ratelimiter_disabled ( true ) ;
@@ -51,6 +48,7 @@ pub async fn entrypoint() {
5148 ratelimiter. set_ratelimit_callback ( Box :: new ( handler:: ratelimit) ) ;
5249 }
5350
51+ info ! ( "building serenity client" ) ;
5452 let mut client =
5553 ClientBuilder :: new_with_http ( token, Arc :: new ( http) , framework_opts:: get_gateway_intents ( ) )
5654 . compression ( TransportCompression :: None )
@@ -68,5 +66,6 @@ pub async fn entrypoint() {
6866 . set ( client. shard_manager . runners . clone ( ) )
6967 . expect ( "no other task should set shard manager" ) ;
7068
69+ info ! ( "starting scripty" ) ;
7170 client. start_autosharded ( ) . await . expect ( "failed to run bot" ) ;
7271}
0 commit comments