Skip to content

Commit

Permalink
fixup! Use CacheRef for CurrentUser (serenity-rs#1996)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored and mkrasnitski committed Sep 21, 2023
1 parent ac1a1e0 commit a584593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/e12_global_data/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct Handler;
impl EventHandler for Handler {
async fn message(&self, ctx: Context, msg: Message) {
// We are verifying if the bot id is the same as the message author id.
if msg.author.id != ctx.cache.current_user_id()
if msg.author.id != ctx.cache.current_user().id
&& msg.content.to_lowercase().contains("owo")
{
// Since data is located in Context, this means you are also able to use it within events!
Expand Down

0 comments on commit a584593

Please sign in to comment.