I am working on teaching myself how to make a custom module for the Discord portion of the bot. I used the module example as a base as that function will plan well into what I am planning for generating random seeds. I was able to get the twitch part working first then tried to change it to work with discord. I see the file getting loaded and enabled, but when I do !randomstring # I do not see any errors or attempts at calling the custom module.
The particular script I put onto github here:
Any thoughts on what I am missing in the code to work with discord?
I have a hypothesis. Can you run !permcom on the command and set it to 0? Then try. I noticed if I set it to 1 in the script once (after clearing my DB entry) and then set to 0 it doesn’t update (which is expected behavior).
Thanks! I am glad to be learning off the example script. Thoughts on why the 0 was ignored to start? Fortunately the discord admins of that server are nice enough to help me out with admin commands when needed when I can’t run them from the admin panel.
I did flip back and forth for a bit when trying to see if it would make a difference. It originally was 7 when starting out from the baseline twitch script. I would settle on 0 though even after flipping it around.
So, the reason why the script doesn’t change it back is we assume that !permcom will set a value and we do not want to overwrite it again with the value from the script for that reason. We also cannot really tell if the value was original or set via permcom (we choose not to track that, need another database table or flag, and not worth the storage really).