Fix menu owner check

Signed-off-by: trivernis <trivernis@protonmail.com>
main
trivernis 3 years ago
parent d5302c84ab
commit 4f4d272ced
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

2
Cargo.lock generated

@ -1040,7 +1040,7 @@ dependencies = [
[[package]]
name = "serenity-rich-interaction"
version = "0.2.4"
version = "0.2.5"
dependencies = [
"futures",
"log",

@ -1,6 +1,6 @@
[package]
name = "serenity-rich-interaction"
version = "0.2.4"
version = "0.2.5"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
description = "Menus and self deleting messages for the serenity discord framework"

@ -206,7 +206,7 @@ impl<'a> EventDrivenMessage for Menu<'a> {
log::debug!("Deleting user reaction.");
reaction.delete(ctx).await?;
if let Some(owner) = self.owner {
if owner == reaction.user_id.unwrap() {
if owner != reaction.user_id.unwrap() {
log::debug!("Menu has an owner and the reaction is not from the owner of the menu");
return Ok(());
}

Loading…
Cancel
Save