changed guild name to be optional

This commit is contained in:
jude 2020-10-27 17:29:40 +00:00
parent a380c1f139
commit 75653a3e88

View File

@ -14,7 +14,7 @@ use crate::consts::{DEFAULT_PREFIX, LOCAL_LANGUAGE, LOCAL_TIMEZONE, STRINGS_TABL
pub struct GuildData {
pub id: u32,
pub name: String,
pub name: Option<String>,
pub prefix: String,
}
@ -57,6 +57,8 @@ SELECT id, name, prefix FROM guilds WHERE guild = ?
.fetch_one(pool)
.await
{
g.name = guild.name;
Ok(g)
} else {
sqlx::query!(