Fix call skipping message
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user