Delete a task by the global unique ID
(
&self,
guild_id: Id<GuildMarker>,
id: u64,
)
| 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, |
no test coverage detected