Updates the error message when the event is wrong. It now errors on the proc name instead of giving an undeclared field error
Before
/tmp/test.nim(9, 35) template/generic instantiation of `event` from here
/home/user/.nimble/pkgs2/dimscord/dimscord/helpers.nim(37, 5) Error: undeclared field: 'test=' for type objects.Events [type declared in /home/user/.nimble/pkgs2/dimscord/dimscord/objects/typedefs.nim(849, 5)]
After
/home/user/Documents/projects/dimscord/dimscord/helpers.nim(74, 57) event
/home/user/Documents/projects/dimscord/test.nim(9, 6) Error: 'test' is not a valid dimscord event
Line info
Also makes sure the anonymous function has the same line info as the function, helps make some warnings/errors point to the right line
Error message
Updates the error message when the event is wrong. It now errors on the proc name instead of giving an undeclared field error Before
After
Line info
Also makes sure the anonymous function has the same line info as the function, helps make some warnings/errors point to the right line