Skip to content

FanFanFantazy/discord-bot-noobs

Repository files navigation

discord-bot-noobs

A simple discord-bot bases on Repl.it

This project aims to discover how to program a Discord bot by using JavaScript. Because of the firewall issue, the project is loaded on Repl.it. One good reason is, by using Repl.it the environmental problems are minimised. The idea comes from a pythoneer Gareth Dwyer's 'Building a Discord Bot with Python and Repl.it'.

https://www.codementor.io/garethdwyer/building-a-discord-bot-with-python-and-repl-it-miblcwejz

v0.0.1 realised normal message-sending processes. Two nano games(roll dice & flip coin) are provided as well.

  1. Create a new Repl account, choose "Nodejs" as your language.
  2. Create a Discord Bot and log it in your Discord serve.
  3. Change the TOKEN in a file: .env (there is no space beside= )
  4. The dependencies can be installed automatically after saving package.json. If there is nothing happen, you can refresh the whole webpage to reload. discord.js-commando is used as main dependency so far, rather then discord.js. discord.io and winston can be ignored.
  5. Run the code in Repl.it and make sure your bot is online
  6. Type !help to your bot, you can see instructions and all available commands.
  7. For example, type !roll, you will see a dice number as follow ```@Author You got a 4
  8. The richEmbed message includes URL, online image, local image, title, fields etc.

In the next version, a python program will be connected for proving dynamic data from public websites. Meanwhile, a python version program will be developed which aims to be embedded in a Raspberry Pi to mobilised the server.