ClemBotProject / ClemBot

A Discord bot for server management with an emphasis on modularity and configuration. If you have an idea or a feature you would like to contribute feel free to open an issue and we as a community can begin discussion.
https://clembot.io
MIT License
83 stars 57 forks source link
csharp discord-bot discord-py dotnet moderation python

ClemBot Logo

ClemBot


Support Made with Python 3.10 MIT License

ClemBot

Website, Documentation and Configuration Dashboard

https://clembot.io

Intro

A Discord bot for server and community management with a focus on school/programming/fun related commands.

ClemBot is in current active development so check back often to see what's new!!

Bot Invite

To invite ClemBot to your server, click here.

Community

We are a community focused on learning and acceptance; anyone is welcome. If you have an idea or a feature you would like to contribute, feel free to open an issue and we as a community can begin discussion.

Development

To start developing and contributing to this project, please see CONTRIBUTING.md

Architecture overview

ClemBot utilizes a standard three tier architecture. The ClemBot.Bot project makes requests to the ClemBot.Api project, which then subsequently queries the PostgreSQL database.

ClemBot.Bot

The bot is set up in a simple way. There are 3 layers, the Cog Layer, the Service Layer and the Route Layer. Cogs and Services communicate exclusively through the messenger. This allows us to maintain total decoupling of the layers.

  1. Cog Layer: This is where the frontend bot command code resides. Anything that you directly use to interface with discord goes in this layer.
  2. Service Layer: This is where all things that are bot related but not controlled through front end commands live. Things like user tracking, event handling, etc., all go in here.
  3. Route Layer: This is the route abstraction on top of the ApiClient. This layer defines methods that correspond to routes that are sent back to the ClemBot.Api project

The bot loads Cogs and Services dynamically. To create a new command, simply create a class that inherits from commands.Cog and define a setup function in module scope at the bottom. See example_cog.py for an example.

The bot does the same thing for services, to see how to define a service, see example_service.py.

ClemBot.Api

The API utilizes the following technologies...

...and is split up into several different projects under one solution:

ClemBot.Site

The site is a server-side Nuxt.js and Vue.js app that integrates with Discord OAuth.

ClemBot Pipeline Status

Service Pipeline Status
Api ClemBot.Api Master Integration ClemBot.Api Master Integration
Api ClemBot.Api Master Deployment ClemBot.Api Master Deployment
Bot ClemBot.Bot Master Integration ClemBot.Bot Master Integration
Bot ClemBot.Bot Master Deployment ClemBot.Bot Master Deployment
Site ClemBot.Site Master Integration ClemBot.Site Master Integration
Site ClemBot.Site Master Deployment ClemBot.Site Master Deployment