https://github.com/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://github.com/ClemBotProject/ClemBot
csharp discord-bot discord-py dotnet moderation python
Last synced: about 1 year ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/ClemBotProject/ClemBot
- Owner: ClemBotProject
- License: mit
- Created: 2020-04-25T03:21:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-16T00:26:05.000Z (almost 2 years ago)
- Last Synced: 2024-07-16T03:57:19.570Z (almost 2 years ago)
- Topics: csharp, discord-bot, discord-py, dotnet, moderation, python
- Language: Python
- Homepage: https://clembot.io
- Size: 26 MB
- Stars: 83
- Watchers: 4
- Forks: 57
- Open Issues: 65
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-discord - ClemBot
README
# 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.
- Moderation: Moderation and Moderation logging is made easy with ClemBot, Banning, Muting and Warning are all
supported and easy to use
- Role Management: Easily manage you and your users roles with designated assignable roles
- Customizable Prefix: Whatever you want ClemBot to respond to, it can. Just set your servers preferred prefix
with `!prefix `.
- Python Repl: Coding is fun, Discord is fun. Put them together and collaborative learning is easy with a
built-in python interpreter. Just type your python code into discord and run it with `!eval` and watch the bot
evaluate your code.
- Message Logging: ClemBot offers the ability to log message edits and deletions, just
run `!channels add message_log #mychannel` to designate a channel as a log message
- Tags: Tags allow you to create message snippets that can be invoked right in discord with a simple inline
command. Just run `!tag add ` and invoke it with `$MyTagName`
- Welcome Messages: You can optionally set a message to be sent to new members of your server. Making it easy to
make sure people understand rules and procedures.
- Expression Evaluator: ClemBot implements the shunting yard algorithm to allow for rapid mathematical
expression evaluation right in discord. just run `!calc 1+1` to get your result
- ...and so much more!
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](https://discord.com/api/oauth2/authorize?client_id=710672266245177365&permissions=398828104950&scope=bot).
## 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](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](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html?highlight=cog#discord.ext.commands.Cog)
and define a setup function in module scope at the bottom.
See [example_cog.py](https://github.com/ClemsonCPSC-Discord/ClemBot/blob/master/bot/cogs/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](https://github.com/ClemsonCPSC-Discord/ClemBot/blob/master/bot/services/example_service.py).
## ClemBot.Api
The API utilizes the following technologies...
* [Asp.Net](https://dotnet.microsoft.com/apps/aspnet)
* [Entity Framework](https://docs.microsoft.com/en-us/ef/)
* [MediatR](https://github.com/jbogard/MediatR)
* [Serilog](https://serilog.net/)
...and is split up into several different projects under one solution:
- **ClemBot.Api.Data** contains the Entity Framework code-first database models and contexts.
- **ClemBot.Api.Core** contains the startup project and Asp.Net endpoints located in the `Features` folder.
- **ClemBot.Api.Services** contains the caching and authorization services that perform more complex tasks.
## ClemBot.Site
The site is a server-side Nuxt.js and Vue.js app that integrates with Discord OAuth.
* [Vue.js](https://vuejs.org/)
* [Nuxt.js](https://nuxtjs.org/)
## ClemBot Pipeline Status
| Service | Pipeline | Status |
|---------|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| Api | ClemBot.Api Master Integration |  |
| Api | ClemBot.Api Master Deployment |  |
| Bot | ClemBot.Bot Master Integration |  |
| Bot | ClemBot.Bot Master Deployment |  |
| Site | ClemBot.Site Master Integration |  |
| Site | ClemBot.Site Master Deployment |  |