Jump to content
McKay Development

Verify bot files


Recommended Posts

  • 1 year later...
On 2/22/2020 at 7:12 AM, HelloWorld said:

How do I get the direct detection of the bot when I change the content of the /message file.  I do not want to close and open the bot and enter the guard code.

is your /message file a .json or .js.

Listen for file changes, it it's a .json you can just re-require it. I'm not sure if it works with .js file.

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
var itemlist = require('./itemlist/itemlist.json');
client.on('friendMessage#'+Config.admin, function(steamID, message) {
	if (message.toUpperCase().indexOf("@changejson") >= 0) {
		delete require.cache[require.resolve("./itemlist/itemlist.json")]
		itemlist = require('./itemlist/itemlist.json').data;

here is code when bot get your message, it will reset itemlist to new


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...