diff options
author | turret <turret@duck.com> | 2025-09-29 00:12:45 -0500 |
---|---|---|
committer | turret <turret@duck.com> | 2025-09-29 00:12:45 -0500 |
commit | 4e360a4ed7cd77709588b659c704b43d6d474031 (patch) | |
tree | 934bbdaed91aa282c015b7ad891b184bdcfe3e2c /util/command.c | |
parent | 535ff19dd942d9d53228200eea9096e7e59f76f8 (diff) | |
download | discord-bot-skeleton-4e360a4ed7cd77709588b659c704b43d6d474031.tar.gz discord-bot-skeleton-4e360a4ed7cd77709588b659c704b43d6d474031.tar.bz2 discord-bot-skeleton-4e360a4ed7cd77709588b659c704b43d6d474031.zip |
command: add command decl sys
additionally, edit ping to use new abstractions and command declaration
facilities. TODO: move interaction create event to somewhere else. this
spot isnt too good for it.
Diffstat (limited to 'util/command.c')
-rw-r--r-- | util/command.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/util/command.c b/util/command.c new file mode 100644 index 0000000..57a0bc1 --- /dev/null +++ b/util/command.c @@ -0,0 +1,17 @@ +#include <stddef.h> + +#include <cJSON.h> +#include <stb_ds.h> + +#include <dbs/commands.h> +#include <dbs/init.h> +#include <dbs/log.h> + +Command *commands = NULL; + +void register_commands() { + for(int i = 0; i < arrlen(commands); ++i) { + print("command %s: %s (@%x)", commands[i].name, commands[i].description, (long long)commands[i].callback); + } +} +l4_initcall(register_commands); |