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();
|
.stream();
|
||||||
|
|
||||||
while let Some(interaction) = interaction_stream.next().await {
|
while let Some(interaction) = interaction_stream.next().await {
|
||||||
|
if interaction.user.id == msg.author.id {
|
||||||
let action = &interaction.data.custom_id;
|
let action = &interaction.data.custom_id;
|
||||||
if action == "remove" {
|
if action == "remove" {
|
||||||
msg.delete(&ctx).await.unwrap();
|
msg.delete(&ctx).await.unwrap();
|
||||||
|
@ -151,6 +152,7 @@ impl EventHandler for Handler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
|
|
Loading…
Reference in a new issue