Dragory / modmailbot

Modmail Bot is a bot for Discord that makes it easier for users to contact moderators and admins for help.
MIT License
708 stars 703 forks source link

NPM command does work! #52

Closed clashwithA closed 6 years ago

clashwithA commented 6 years ago

Hey.. today i tried to et up the bot and in cmd i typed npm install and it said there is no file something like that... can you help me please also dont hesitate to ask me for more info

clashwithA commented 6 years ago

@Dragory

Dragory commented 6 years ago

Please make sure you're in the correct folder with CMD when you run the command.

clashwithA commented 6 years ago

I am in Modmail-master folder with cmd... is that the correct folder? @Dragory

clashwithA commented 6 years ago

2018-02-11_li_moment_moment3 Im talking about this @Dragory

Dragory commented 6 years ago

That means that you have not installed NodeJS correctly. If you did, try restarting before running the commands.

clashwithA commented 6 years ago

Where do i get NodeJS from? Also you have any other form of contact other than GitHub? like discord @Dragory

Dragory commented 6 years ago

You can find instructions for installing NodeJS on your platform at https://nodejs.org/ (install version 8, not 9). Also, no, sorry, I don't offer support for the bot outside GitHub issues.

clashwithA commented 6 years ago

inked2018-02-11 4 _li_moment_momente

I type -npm start and this came up.. what should i do? @Dragory

Dragory commented 6 years ago

Please read and go through the instructions at https://github.com/Dragory/modmailbot/blob/master/README.md#setup. You're missing step 4, the config file.

clashwithA commented 6 years ago

i did that... i copied and changed it to my own stuff @Dragory

Dragory commented 6 years ago

Check the path and especially the file extension. The error says it can't find the config.json file in the modmailbot-master folder.

clashwithA commented 6 years ago

inked2018-02-11 e After checking the path and trying again this came up.. im so sorry for asking too many questions.. we need to bot so bad.. (over 400 members on the server) also what should i do? thx @Dragory

Dragory commented 6 years ago

The command is npm start, not npm run 😛

clashwithA commented 6 years ago

After typing that in i get this and i followed step 4 inked2018-02-12 1 _li_momente

so i tried again but this time in a folder: inked2018-02-12 1 _li_momente

here is the overview of config.json: inked2018-02-12 d

please tell me where im making a mistake and thx @Dragory

Dragory commented 6 years ago

Your file is currently named config.json.json - make sure it's just config.json. If you have file extensions hidden in Windows (they are by default), try renaming it to just config.

clashwithA commented 6 years ago

The bot works but when i get someone to message it and it goes offline and doesn't show in the inbox server also when it does in the server i try to close it and a whole bunch of errors come up in cmd and the bot goes offline...

clashwithA commented 6 years ago

@Dragory

Dragory commented 6 years ago

Please post those errors

clashwithA commented 6 years ago

do you have discord? it will take me a long time... @Dragory

never mind look below

clashwithA commented 6 years ago

inked2018-02-12 4 _li_momente There you go @Dragory

Dragory commented 6 years ago

Can you get a picture from further up?

clashwithA commented 6 years ago

2018-02-12 8 2018-02-12 6 2018-02-12 7

2018-02-12 9

2018-02-12 8 2018-02-12 10 2018-02-12 5

inked2018-02-12 4 _li_momente

There you go @Dragory

Dragory commented 6 years ago

Try setting logChannelId in the config file. It should be set to a channel ID on the inbox server (the bot will post log links to closed threads etc. there).

I forgot to add this to the README since the option wasn't required until Discord removed default channels last year, sorry!

clashwithA commented 6 years ago

I dont understand what you mean... Help? @Dragory

clashwithA commented 6 years ago

When i type a message the bot goes offline without responding @Dragory

clashwithA commented 6 years ago

I tried the Logchannel thing but it keep on giving me errors when i message the bot and it doesn't respond

Dragory commented 6 years ago

Make sure you added logChannelId like this: image

It could also be a corrupted thread database. Remove db/threads.json and restart the bot and see if that works.

Also, seems like the error message contained your bot's token as well, so I recommend resetting that (and then changing the token in config.json to the new token).

clashwithA commented 6 years ago

Thx it works now... for now lol... Just a question how do i make this bot online forever?

Dragory commented 6 years ago

To keep the bot online forever, you'd need to run it on a PC that's online forever. Usually this means a virtual server rented from a provider such as DigitalOcean, but that's its own can of worms to set up.

clashwithA commented 6 years ago

Heroku can make it work as well am I right? @dragory

Dragory commented 6 years ago

Should work, though I haven't tried hosting it on Heroku myself, so no guarantees.

clashwithA commented 6 years ago

I will add the token and it will detect the bot and then it should host it itself... I will let you know if it works... It should be good to add it to your how to host it on a server if it works

sporkwitch commented 6 years ago

@clashwithA if this issue is resolved, please close it; if not, what's the ongoing trouble?