MCPcopy Create free account
hub / github.com/Botloader/botloader / del_task_by_id

Method del_task_by_id

components/stores/src/timers.rs:229–243  ·  view source on GitHub ↗

Delete a task by the global unique ID

(
        &self,
        guild_id: Id<GuildMarker>,
        id: u64,
    )

Source from the content-addressed store, hash-verified

227
228 /// Delete a task by the global unique ID
229 pub async fn del_task_by_id(
230 &self,
231 guild_id: Id<GuildMarker>,
232 id: u64,
233 ) -> TimerStoreResult<u64> {
234 let res = sqlx::query!(
235 "DELETE FROM scheduled_tasks WHERE guild_id = $1 AND id = $2",
236 guild_id.get() as i64,
237 id as i64,
238 )
239 .execute(&self.pool)
240 .await?;
241
242 Ok(res.rows_affected())
243 }
244
245 pub async fn del_task_by_key(
246 &self,

Callers 2

ack_triggered_taskMethod · 0.80
op_bl_del_taskFunction · 0.80

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected