Switched from diesel to sqlx
This commit is contained in:
@@ -82,13 +82,13 @@ impl EventHandler for Handler {
|
||||
for guild in ready.guilds {
|
||||
// Check if guild exists in database
|
||||
let guild_id = guild.id.get() as i64;
|
||||
if let Err(why) = GuildCache::get(guild_id) {
|
||||
if let None = GuildCache::get_by_id(guild_id).await.unwrap() {
|
||||
let guild_cache = GuildCache {
|
||||
id: guild_id,
|
||||
bot_id: 1,
|
||||
volume: 100
|
||||
};
|
||||
guild_cache.insert();
|
||||
guild_cache.insert().await.unwrap();
|
||||
}
|
||||
let commands = guild
|
||||
.id
|
||||
|
||||
Reference in New Issue
Block a user