Fix call skipping message

This commit is contained in:
2025-08-23 01:17:02 -03:00
parent d0aa3d72d5
commit 6df7fd272f
3 changed files with 26 additions and 2 deletions
+19
View File
@@ -286,6 +286,25 @@ impl User {
is_first_incident: incidents.is_empty(), is_first_incident: incidents.is_empty(),
}) })
} }
pub async fn count(&self, session: &Session) -> Result<usize, DatabaseError> {
let result = session
.query_unpaged(
r#"
SELECT
user_id
FROM
payphone.users;
"#,
(),
)
.await
.map_err(DatabaseError::QueryError)?
.into_rows_result()
.map_err(|_| DatabaseError::ResultNotRows)?;
Ok(result.rows_num())
}
} }
impl From<TwilightUser> for User { impl From<TwilightUser> for User {
+3 -2
View File
@@ -215,8 +215,9 @@ impl Command<State, Extras> for SkipCommand {
if let Some(call) = call { if let Some(call) = call {
ctx.send() ctx.send()
.content(format!( .content(format!(
"☎️ {}", "**TIP:** {}\n☎️ Skipped! Searching for a call...\n☎️ {}",
get_string_call_hangup_this_party(ctx.prefix) get_string_tips(ctx.prefix),
get_string_call_answered(ctx.prefix)
)) ))
.await .await
.bye(); .bye();
@@ -20,6 +20,8 @@ nlger
nlgers nlgers
ngiga ngiga
ngigas ngigas
negaras
nigy
diga diga
digas digas
fag fag
@@ -30,6 +32,8 @@ fgot
fgots fgots
fgt fgt
fgts fgts
phagot
phagots
retard retard
retards retards
rtrd rtrd