keanuplayz / TravBot-v3

Rewrite of TravBot to Discord.JS v13 in TypeScript. Revision 4 of TravBot, version number 3.
MIT License
6 stars 3 forks source link

What to do after npm start? #52

Closed digikar99 closed 1 year ago

digikar99 commented 1 year ago

Hi! Thank you for working on this.

On a clean linux distro, I managed to successfully run npm install after installing a few dependencies like g++ libjpeg-dev libgif-dev.

npm run build also exited successfully.

However, npm start asks for several things like token and prefix. Could you please point me to where one is supposed to obtain this from?

Thanks!

lexisother commented 1 year ago

Log into the Discord developer portal and create an app there: https://discord.com/developers image You can get your token from the bot page after creating a bot.

Your token is whatever you want Trav to listen to when trying to run a command. For example, if you use the prefix !!, commands would be called like !!help.

digikar99 commented 1 year ago

Well, so I run npm start. Then, it asks me for the token, I enter it from https://discord.com/developers/applications/ -> OAuth2. Then it exits.

I'm still confused about how do I run the bot after this point.

lexisother commented 1 year ago

Can you show a screenshot?

digikar99 commented 1 year ago

image

digikar99 commented 1 year ago

Okay, I just did a clean rebuild, and now I get the message "It seems the token you provided is invalid."

My data/config.json file is in the following format, and the bot was created using (say) the discord user account abc#1234:

{
    "token": "long-random-string-from-oauth2-page",
    "prefix": ".",
    "owner": "abc#1234",
    "admins": [
        "abc#1234"
    ],
    "support": [
        "abc#1234"
    ],
    "lavalink": null,
    "wolfram": null,
    "systemLogsChannel": null,
    "webhooks": {}
}

Am I missing something? (I haven't worked with discord apps/bots ever before.)

digikar99 commented 1 year ago

Okay I had to toggle a few things under "Privileged Gateway Intents" and change the "owner" to the bot's username. After this, it reads "Ready Logged in as <bot's username>".

Erm, but let me confirm, is this bot totally unrelated to the MMORPG called 'Travian'?

lexisother commented 1 year ago

Yes it is. Apologies for the confusion, I have noticed the naming conflict about three years ago, I think what you're looking for is this! https://travbot.eu/

digikar99 commented 1 year ago

Oh, no problem, and thanks :)!