Coder Social home page Coder Social logo

abuelabot's Introduction

abuelabot

A general purpose Discord bot. Abuela's main features revolve around displaying data from various REST APIs, scheduled messages with cron, manipulating text input from the user in a hopefully entertaining manner and even some basic audio capabilities. The main instance is currently being hosted on a Heroku dyno.

Just as a heads up: I am most likely going to rewrite the commands to use Discord's slash command instead, as soon as discord.ts releases the new decorators on master.


Setup

  • Duplicate the .example.env file and rename the duplicate to .env. Assign a valid value to every one of the environment variables. These are mostly bot settings and API keys. All variables are required.

    • .env requires you to specify two bot tokens. This is for switching between the main instance of Abuela and a dev instance for development. Toggle between the two by specifying either ENV=DEV or ENV=PROD. Make sure that your production environment only uses ENV=PROD.
  • Run npm install to install all the necessary dependencies

    • TypeScript and ts-node will be your bread and butter for this project and will get installed locally with the previously mentioned npm install. I still recommend installing these two globally with npm install -g typescript ts-node if you haven't already.
  • Run npm run watch for TypeScript compilation with live reloading.


Gotchas

  • Don't get fooled by the /dist directory. It is only being used for TypeScript pre-compilation with tsc. However, this is neither required for production, nor for local development. Feel free to find a use case for pre-compilation if you really need to.
  • The property commandName in the CommandMessage object passed by the @Command() decorator does not reliably return the current commandName. There seems to be an issue with the library.

Special credits go out to https://github.com/OwenCalvin/discord.ts for this nifty discord.js wrapper.

A project by YourTeaGuy, SumWunSpeshal and Monsieur-Monet.

abuelabot's People

Contributors

sumwunspeshal avatar monsieur-monet avatar yourteaguy avatar

Stargazers

Kevin Puls avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.