Skip to content

Commit d3715ff

Browse files
main: use main serenity client
this fixes an issue where .token() and .intents() were no longer recognized, due to a change made in newer versions of the poise command framework.
1 parent f4d8a66 commit d3715ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ async fn main() -> Result<(), Error> {
3030
},
3131
..Default::default()
3232
})
33-
.token(token)
34-
.intents(GatewayIntents::all())
35-
.setup(move |_ctx, _ready, _framework| Box::pin(async move { Ok(Data {}) }));
33+
.setup(move |_ctx, _ready, _framework| Box::pin(async move { Ok(Data {}) }))
34+
.build();
3635

37-
framework.run().await.unwrap();
36+
let client = serenity::Client::builder(token, GatewayIntents::all()).framework(framework).await;
37+
client.unwrap().start().await.unwrap();
3838

3939
Ok(())
4040
}

0 commit comments

Comments
 (0)