0

This is not for a browser.

I intend to make a "blacklist" array for my bot, which will prevent users from running commands. However, I can only seem to do this on the actual bot file as I haven't found a way to do an external method.

What I'd want to do is have my main bot file as normal, but have a blacklist.txt with an array including their username, discord account ID and extra notes which can be accessed at any time by admins using a command.

This is what I'm using:

var blacklist=[
    {username:'',userid:'',notes:''},
]
Liam
  • 27,717
  • 28
  • 128
  • 190
Kai_T4
  • 33
  • 1
  • 5
  • 3
    Does this answer your question? [Using Node.JS, how do I read a JSON file into (server) memory?](https://stackoverflow.com/questions/10011011/using-node-js-how-do-i-read-a-json-file-into-server-memory) – Eriks Klotins Apr 24 '20 at 12:08

1 Answers1

0

It's possible with node.js(a platform based on javascript) Here is an example how to do that Using Node.JS, how do I read a JSON file into (server) memory?

kharandziuk
  • 12,020
  • 17
  • 63
  • 121