Skip to content

Commit

Permalink
Fix premium removal database query
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Dec 4, 2023
1 parent d6ec97a commit 679874a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/events/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ pub async fn listen(
Event::GuildMemberAddition { new_member } => {
guild_member_addition(ctx, data, new_member).await
}
Event::GuildMemberRemoval {
guild_id,
user,
member_data_if_available: _,
} => guild_member_removal(ctx, data, *guild_id, user).await,
Event::GuildMemberRemoval { guild_id, user, .. } => {
guild_member_removal(ctx, data, *guild_id, user).await
}
Event::VoiceStateUpdate { old, new } => {
voice_state_update(ctx, data, old.as_ref(), new).await
}
Expand Down
2 changes: 1 addition & 1 deletion src/funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub async fn remove_premium(data: &Data, guild_id: serenity::GuildId) -> Result<
.set_one(guild_id.into(), "premium_user", None::<i64>)
.await?;
data.guilds_db
.set_one(guild_id.into(), "voice_mode", None::<TTSMode>)
.set_one(guild_id.into(), "voice_mode", TTSMode::default())
.await
}

Expand Down

0 comments on commit 679874a

Please sign in to comment.