add test post flag
This commit is contained in:
parent
6e399e6c43
commit
5a7730e095
19
awoobot.rkt
19
awoobot.rkt
|
@ -68,8 +68,19 @@
|
||||||
(path->string (path->complete-path (find-system-path 'run-file)))))
|
(path->string (path->complete-path (find-system-path 'run-file)))))
|
||||||
|
|
||||||
|
|
||||||
(parameterize ([current-config (config-from-file "config.rktd")])
|
(define selftest (make-parameter #f))
|
||||||
(run-bot)
|
|
||||||
(schedule-next)
|
|
||||||
|
|
||||||
(void))
|
(command-line
|
||||||
|
#:program "awoobot"
|
||||||
|
#:once-each
|
||||||
|
[("-t" "--test") "Send a test post" (selftest #t)]
|
||||||
|
#:args ()
|
||||||
|
(parameterize ([current-config (config-from-file "config.rktd")])
|
||||||
|
(if (selftest)
|
||||||
|
(begin
|
||||||
|
(displayln "testing config")
|
||||||
|
(send-toot/retry-on-err (make-toot "test post pls ignore,")))
|
||||||
|
(begin
|
||||||
|
(run-bot)
|
||||||
|
(schedule-next)))
|
||||||
|
(void)))
|
||||||
|
|
Loading…
Reference in New Issue