242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
let mut words = data.split_whitespace();
let cmd = words.next().unwrap();
match cmd {
// start
"/start" => {
reply.push("Not in service yet\\. Try later\\.".to_string());
},
// list
"/list" => {
reply.push("Channels:".to_string());
let mut rows = sqlx::query("select source_id, username, enabled, url, iv_hash from rsstg_source left join rsstg_channel using (channel_id) where owner = $1 order by source_id")
|
|
|
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
let mut words = data.split_whitespace();
let cmd = words.next().unwrap();
match cmd {
// start
"/start" => {
reply.push("We are open\\. Probably\\. Visit [channel](https://t.me/rsstg_bot_help/3) for details\\.".to_string());
},
// list
"/list" => {
reply.push("Channels:".to_string());
let mut rows = sqlx::query("select source_id, username, enabled, url, iv_hash from rsstg_source left join rsstg_channel using (channel_id) where owner = $1 order by source_id")
|
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
// check
"/check" => {
&core.check(&words.next().unwrap().parse::<i32>()?, None).await?;
},
// clear
"/clean" => {
if core.owner != i64::from(message.from.id) {
reply.push("Reserved for testing\\.".to_string());
} else {
let source_id = words.next().unwrap().parse::<i32>().unwrap_or(0);
&core.clean(source_id).await?;
|
|
|
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
// check
"/check" => {
&core.check(&words.next().unwrap().parse::<i32>()?, None).await?;
},
// clean
"/clean" => {
if core.owner != i64::from(message.from.id) {
reply.push("Reserved for testing\\.".to_string());
} else {
let source_id = words.next().unwrap().parse::<i32>().unwrap_or(0);
&core.clean(source_id).await?;
|