more files migrated to new LANG
This commit is contained in:
@@ -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(());
|
||||
}
|
||||
@@ -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(());
|
||||
}
|
||||
@@ -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(());
|
||||
}
|
||||
Reference in New Issue
Block a user