~williewillus/r16

a352c34454a335664b52b97214ad35e20560f9d9 — Vincent Lee a month ago 60c0b4d
Show total trick invocation count in rkt stats
1 files changed, 7 insertions(+), 3 deletions(-)

M main.rkt
M main.rkt => main.rkt +7 -3
@@ 192,9 192,13 @@
         (string-join _ ":"))))

(define (stats client db message text)
  (~a "Uptime (dd:hh:mm:ss): " (uptime)
      "\n"
      "Bytes in use: " (current-memory-use)))
  (string-join
   (list (~a "Uptime (dd:hh:mm:ss): " (uptime))
         (~a "Bytes in use: " (current-memory-use))
         (~a "Total trick invocations (for your guild): "
             (for/sum ([trick (in-list (db:all-tricks db (context-id message)))])
               (trick-invocations trick))))
   "\n"))

(define (cmp-tricks lt rt)
  (let ([l (cdr lt)] [r (cdr rt)])