about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2024-09-29 12:52:17 +0300
committerNakidai <nakidai@disroot.org>2024-09-29 12:52:17 +0300
commit4e3de1ba7bb5e8e689691e391826d8c444906d27 (patch)
treef18adf05f572228f682ee8ab869dfaf8362202d5
parent4fe027c28db21e4355661010be4e78a12268e0f7 (diff)
downloadcptc-4e3de1ba7bb5e8e689691e391826d8c444906d27.tar.gz
cptc-4e3de1ba7bb5e8e689691e391826d8c444906d27.zip
Update usage
Add info about env var
-rw-r--r--main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main.c b/main.c
index bbc5dfd..fd97a66 100644
--- a/main.c
+++ b/main.c
@@ -28,13 +28,15 @@ noreturn void usage(char *name, bool full)
     fprintf(
         full ? stdout : stderr,
         full ?
-            "usage: %s [-h] [-i/--host IP] [-p/--port PORT]\n"
+            "usage: env CPTC_TOKEN=TOKEN %s [-h] [-i/--host IP] [-p/--port PORT]\n"
             "Also requires CPTC_TOKEN environment variable set to some discord\n"
             "bot's token\n\n"
             "Options:\n"
-            "  -h, --help       show this help message and quit\n"
-            "  -i, --host IP    set bind address to IP )default: 127.0.0.1)\n"
-            "  -p, --port PORT  set bind port to PORT (default: 8080)\n"
+            "  -h, --help        show this help message and quit\n"
+            "  -i, --host IP     set bind address to IP )default: 127.0.0.1)\n"
+            "  -p, --port PORT   set bind port to PORT (default: 8080)\n"
+            "Environment variables:\n"
+            "  CPTC_TOKEN=TOKEN  Discord bot's TOKEN\n"
         :
             "Try '%s --help' for more information\n",
         name