Do not delete if interaction not done by original user
This commit is contained in:
parent
178ca616d1
commit
9efafd302a
|
@ -141,6 +141,7 @@ impl EventHandler for Handler {
|
|||
.stream();
|
||||
|
||||
while let Some(interaction) = interaction_stream.next().await {
|
||||
if interaction.user.id == msg.author.id {
|
||||
let action = &interaction.data.custom_id;
|
||||
if action == "remove" {
|
||||
msg.delete(&ctx).await.unwrap();
|
||||
|
@ -150,6 +151,7 @@ impl EventHandler for Handler {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
|
|
Loading…
Reference in a new issue