Hi I am currently using Discord.js to create my own discord bot and testing in the command line using node.js
I was wondering if anybody could help me create a command that only "Mods" could use, Im talking about bot mods so a owner of the bot could do +addmod USER to add that user to some data file that the bot would pull from to check if the user was on it when they ran a "Mod only" command.
Link to source-code: https://ghostbin.com/paste/tnovx
It's not too complicated. If you want to check from a text file, use
fs
module and combine it with bots functions. I hope this gives you a little insight on how it could be done.Your txt file should be like this, put them all to a new line since I have used
split()
function, or if you have any better idea you can use that toousers.txt