Giter Site home page Giter Site logo

boolean's Introduction

Boolean

About

A bot for Conaticus' Discord server. A document of the development process has been made here: https://www.youtube.com/watch?v=xq2jR3_msmk.

If you like cool coding projects like this, subscribe to me at https://www.youtube.com/channel/UCRLHJ-7b4pjDpBBHAUXEvjQ

Documentation

Setup

Installation

  • Clone/Fork the repository
  • Run cd boolean
  • Run npm i

Setting up the .env

In order to setup the bot, you must create a .env in the parent directory as you can see in the example, .env.example.

In this file you must declare the bot's TOKEN - this is the token from the Discord Developer Portal.

Syntax:

TOKEN="your bot's TOKEN"

This will automatically be ignored from the .gitignore. So don't worry about this data being public.

Running the bot

In order to start the bot, you must run npm run dev to run the TypeScript developer environment. Don't worry about the other package.json scripts, they are for production.

Due to many of the values being hardcoded, in order to run your instance you will need to change some values - such as the guildId in config.ts as it is used for deploying slash commands.

Other Information

Embed Colours

General: "ORANGE"
Success: "GREEN"
Error: "RED"

Configuration

The configuration file is used for constant variables that will be reused in the application, such as ids and reaction messages. It is located at /src/config.ts - feel free to add anything that matches this description.

Data

Data is currently stored in the data.json file. Only reaction messages are stored here, which is why a database is not present. If you are adding more data handling to the bot, please switch to sqlite.

Config

Set

To specify something in the config find the config object in the config.ts file, after specify something like "NAME": <VALUE>.

Get

To read from it, require config then read the value specified by doing config.<VALUE TO READ>.

Logging

Console levels and their refrences

  • Fatal : logger.console.fatal("")
  • Error : logger.console.error("")
  • Warn : logger.console.warn("")
  • Info : logger.console.info("")
  • Debug : logger.console.debug("")
  • Trace : logger.console.trace("")
  • Silent : logger.console.silent("")

Channel logging

-Embed : logger.channel(<EMBED>, <CHANNEL>)

Contributing

Look at CONTRIBUTING.md to find out how you can help contribute to the development of this bot.

boolean's People

Contributors

conaticus avatar jakob5358 avatar infinitydevtech avatar max-programming avatar noobif-y avatar speckyyt avatar shocktr avatar xhayper avatar benjammingkirby avatar realjobogamer avatar parasharsangeet avatar leocatsune avatar fartdev avatar shungjung 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.