Fix call skipping message
This commit is contained in:
@@ -286,6 +286,25 @@ impl User {
|
||||
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 {
|
||||
|
||||
@@ -215,8 +215,9 @@ impl Command<State, Extras> for SkipCommand {
|
||||
if let Some(call) = call {
|
||||
ctx.send()
|
||||
.content(format!(
|
||||
"☎️ {}",
|
||||
get_string_call_hangup_this_party(ctx.prefix)
|
||||
"**TIP:** {}\n☎️ Skipped! Searching for a call...\n☎️ {}",
|
||||
get_string_tips(ctx.prefix),
|
||||
get_string_call_answered(ctx.prefix)
|
||||
))
|
||||
.await
|
||||
.bye();
|
||||
|
||||
@@ -20,6 +20,8 @@ nlger
|
||||
nlgers
|
||||
ngiga
|
||||
ngigas
|
||||
negaras
|
||||
nigy
|
||||
diga
|
||||
digas
|
||||
fag
|
||||
@@ -30,6 +32,8 @@ fgot
|
||||
fgots
|
||||
fgt
|
||||
fgts
|
||||
phagot
|
||||
phagots
|
||||
retard
|
||||
retards
|
||||
rtrd
|
||||
|
||||
Reference in New Issue
Block a user