add detailed help and polls commands

This commit is contained in:
biglyderv 2025-03-27 22:12:19 -04:00
parent 15f6ca9715
commit c278da1705
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
3 changed files with 63 additions and 18 deletions

View file

@ -8,6 +8,8 @@
#include "main.h"
// todo: polls, help commands, spacing in combos
void init_tables(hashmap *elements, hashmap *inv, hashmap *polls, int do_inv) {
load_elements(elements, "../elem_data/" combo_file, 0);
load_elements(elements, combo_file, 0) ||
@ -25,7 +27,6 @@ void init_tables(hashmap *elements, hashmap *inv, hashmap *polls, int do_inv) {
load_elements(inv, inv_file, 1);
}
// todo: sanitize, valgrind, look through todos
int main(int argc, char *argv[]) {
char *name;
if (argc < 2) {
@ -64,7 +65,10 @@ int main(int argc, char *argv[]) {
continue;
}
wasCombination = 0;
if (help_command(command))
continue;
if (polls_command(command, polls))
continue;
if (slash_command(command, inv))
continue;