Git Product home page Git Product logo

flobot's Introduction

Moderation Bot in TypeScript using discordjs v14

This project was programmed by some members of Florian Dalwigk's community discord which unfortunately doesn't exist anymore. You can find the new Discord Server here. The bot uses discordjs v14 and is written entirely in TypeScript. We also use a github workflow to automatically deploy the bot on our own server.

Function overview

Command Function
/kick Kicks a user
/ban Bans a user
/timeout timeout a user
/warn warns a user
/strike strikes a user
/about about me
/help shows a multi page information widget
/bj help shows the help information for the BlackJack sub commands

Development

To setup your bot, you have to copy the env.example to .env and set your TOKENs and IDs:

BOT_TOKEN=YOURTOKEN
APPLICATION_ID=YOUR_APPLICATION_ID
TOGGLE_ROLES= <IDs von rollen, die sich Nutzer selbst geben können. Mit, getrennt. Maximal 5 (weil man nicht mehr buttons in eine Nachricht machen kann)>
DB_PATH=<path to sqlite3 db>
REPORT_CHANNEL_ID= <channel, in den Reports geschickt werden sollen>
TICKET_SUPPORTER= <ID der Rolle, die jedem Ticket hinzugefügt wird>
MESSAGE_LOGS= <ID des Channels, in dem gelöschte & bearbeitete Nachrichten protokolliert werden sollen>
JOIN_LOGS= <ID des Channels, in dem protokolliert wird wenn ein Nutzer den Discord betritt/verlässt>

You can also configure the logging behavior in logging.json.

npm commands

The bot is tested with Node Version 18.x

npm ci # to install dependencies
npm run lint # this runs the code linter
npm test # this executes the jest unit tests
npm run dev # this starts the bot with nodemon
npm run start # this starts the bot as in production

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.