Skip to content

Latest commit

 

History

History
56 lines (32 loc) · 1.69 KB

README.md

File metadata and controls

56 lines (32 loc) · 1.69 KB

About

I made a Discord chatbot for my friends one weekend and decided to strip all personal functions to create this skeleton-of-a-Discord-bot project. Feel free to contact me (or open an issue or pull request) if you have any questions or suggestions.

Installation

  1. npm install
  2. Create a Discord bot on Discord's developer site
  3. Supply API token in .env file (DISCORD_TOKEN=your_api_token_here)
  4. Add bot to your Discord server

Run

  • node z-bot.js

Development

Discord.js documentation

ToDo/Ideas

  • Use MongoDB & Mongoose
  • Dialogflow for ML chatbot
  • Chalk.js for pretty console messages

Changelog

  • v1.0 (04/23/18) - Release barebones app

How to get the token

1. Open https://discordapp.com/developers/applications/me and click on "New App".

2. Enter a name for your bot and click "Create App"

3. Click on "Create a Bot user"

4. Reveal the bot's token. This token is used to login your bot.

How to add a bot to your server

In order to add a bot to your server you need it's client id.

You can get your client id from the same page where you created it.

With this id you can create an invite link for your bot:

https://discordapp.com/api/oauth2/authorize?client_id=123456789&scope=bot&permissions=0

If you are the owner or admin of the server you can use this link to add your bot to your server. Otherwise you have to give the link to the server owner/admin and ask him to add your bot.

^ from @BtoBastian