moved database-related commands into subcommands & added wwrps database entry

This commit is contained in:
2026-02-27 13:00:40 +01:00
parent b3a6a7eb25
commit 650cb98a3e
8 changed files with 83 additions and 26 deletions
-28
View File
@@ -1,28 +0,0 @@
use crate::{data::dc_add_server, lang, messages::send_msg, Context, Error};
#[poise::command(
slash_command,
prefix_command,
rename = "add_server",
category = "db",
default_member_permissions = "ADMINISTRATOR",
guild_only,
required_bot_permissions = "SEND_MESSAGES | VIEW_CHANNEL"
)]
/// Add your server to my database so I can sell it! (/s), I only store some minimal data the bot needs.
pub async fn cmd(
ctx: Context<'_>
) -> Result<(), Error>
{
let r = dc_add_server(ctx.data(), ctx.guild_id().unwrap().into()).await;
if r.is_ok() {
send_msg(ctx, lang!("dc_msg_add_to_data"), true, true).await;
}
else {
send_msg(ctx, lang!("dc_msg_corrupted_data"), true, true).await;
}
return Ok(());
}