commit
Forgot to commit this stuff
diff --git a/Cargo.lock b/Cargo.lock
index bfaec4f..12966f7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -776,7 +776,7 @@ dependencies = [
[[package]]
name = "proxybot"
-version = "1.0.0"
+version = "2.0.0"
dependencies = [
"anyhow",
"base64 0.22.1",
diff --git a/Cargo.toml b/Cargo.toml
index e2a4646..e5fee52 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
# Cargo.toml
[package]
name = "proxybot"
-version = "1.0.0"
+version = "2.0.0"
edition = "2024"
license-file = "LICENCE.md"
diff --git a/src/commands/help/help.txt b/src/commands/help/help.txt
index f296560..ef9afcd 100644
--- a/src/commands/help/help.txt
+++ b/src/commands/help/help.txt
@@ -5,7 +5,8 @@
`d$switch <member>` sets who's fronting on the site, like `d$switch c1 c2`. `d$switch out` clears it. `d$sw` works too.
`d$member <member>` shows a member's card, like `d$member aether`. `d$m` works too.
`d$ping` shows how fast Discord and the system API respond.
+`d$version` shows the running proxyBot version.
`d$fban <@user or user ID> <reason>` posts a fake ban embed.
--# React ❌ to delete a proxied message, ❓ to see who sent it.
+-# The proxyBot owner can react ❌ to delete a proxied message or a message sent by proxyBot. React ❓ on a proxied message to see who sent it.
`d$log` shows the server's proxy logging settings. `d$log channel #channel` sets the log channel, and `d$log channel -clear` turns logging off.
`d$log cleanup on|off` controls duplicate deletion notices from supported logger bots. These settings require Manage Server or the proxyBot owner.
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index 46e6e59..81fe43c 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -41,6 +41,7 @@ impl Bot {
let reply = match name.as_str() {
"help" => Some(help::text().into()),
+ "version" => Some(format!("proxyBot v{}", env!("CARGO_PKG_VERSION"))),
"explain" | "ex" => Some(self.explain()),
"autoproxy" | "ap" => Some(self.autoproxy(guild, &args).await?),
"edit" | "e" => self.edit(ctx, message, rest).await?.map(str::to_owned),
diff --git a/src/main.rs b/src/main.rs
index 13f3cf6..8299a67 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -147,12 +147,18 @@ impl Bot {
.message(&ctx.http, reaction.message_id)
.await?;
- if !discord::owned(ctx, &message) {
+ let is_proxied = discord::owned(ctx, &message);
+
+ if emoji == "❌" {
+ let is_bot_message = message.webhook_id.is_none()
+ && message.author.id == ctx.cache.current_user().id;
+ if is_proxied || is_bot_message {
+ message.delete(&ctx.http).await?;
+ }
return Ok(());
}
- if emoji == "❌" {
- message.delete(&ctx.http).await?;
+ if !is_proxied {
return Ok(());
}