From 75653a3e885a3119ff89ffb647c057b58211f2cd Mon Sep 17 00:00:00 2001 From: jude Date: Tue, 27 Oct 2020 17:29:40 +0000 Subject: [PATCH] changed guild name to be optional --- src/models.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models.rs b/src/models.rs index e543340..199f261 100644 --- a/src/models.rs +++ b/src/models.rs @@ -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, 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!(