more files migrated to new LANG

This commit is contained in:
2026-03-05 13:16:04 +01:00
parent 4bb7262171
commit 55329505b4
5 changed files with 23 additions and 29 deletions
+4 -7
View File
@@ -1,4 +1,4 @@
use crate::{db::discord::add_server, lang, messages::send_msg, Context, Error};
use crate::{db::discord::add_server, messages::send_msg, Context, Error};
pub async fn cmd(
@@ -7,12 +7,9 @@ pub async fn cmd(
{
let r = 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;
}
if r.is_ok()
{ send_msg(ctx, ctx.data().lang.get("dc.db.added_server", &[]), true, true).await; }
else { send_msg(ctx, ctx.data().lang.get("dc.db.corrupted_data", &[]), true, true).await; }
return Ok(());
}
+5 -11
View File
@@ -1,18 +1,12 @@
use crate::{db::discord::bind_bk, lang, messages::send_msg, Context, Error};
use crate::{db::discord::bind_bk, messages::send_msg, Context, Error};
pub async fn cmd(
ctx: Context<'_>
) -> Result<(), Error>
{
pub async fn cmd(ctx: Context<'_>) -> Result<(), Error> {
let c_id = ctx.channel_id().into();
let r = bind_bk(ctx.data(), ctx.guild_id().unwrap().into(), c_id).await;
if r.is_ok() {
send_msg(ctx, lang!("dc_msg_bound_channel", c_id), true, true).await;
}
else {
send_msg(ctx, lang!("dc_msg_data_server_404"), true, true).await;
}
if r.is_ok()
{ send_msg(ctx, ctx.data().lang.get("dc.db.channel_bind", &[c_id.to_string()]), true, true).await; }
else { send_msg(ctx, ctx.data().lang.get("dc.db.server_404", &[]), true, true).await; }
return Ok(());
}
+4 -7
View File
@@ -1,4 +1,4 @@
use crate::{Context, Error, db::discord::bind_wwrps, lang, messages::send_msg};
use crate::{Context, Error, db::discord::bind_wwrps, messages::send_msg};
pub async fn cmd(
ctx: Context<'_>
@@ -7,12 +7,9 @@ pub async fn cmd(
let c_id = ctx.channel_id().into();
let r = bind_wwrps(ctx.data(), ctx.guild_id().unwrap().into(), c_id).await;
if r.is_ok() {
send_msg(ctx, lang!("dc_msg_bound_channel", c_id), true, true).await;
}
else {
send_msg(ctx, lang!("dc_msg_data_server_404"), true, true).await;
}
if r.is_ok()
{ send_msg(ctx, ctx.data().lang.get("dc.db.channel_bind", &[c_id.to_string()]), true, true).await; }
else { send_msg(ctx, ctx.data().lang.get("dc.db.server_404", &[]), true, true).await; }
return Ok(());
}