Banana Bot is a bot designed for The People's Republic of Banana. In addition to the moderation and utility commands standard in most bots, Banana Bot analyzes messages sent and determines whether a message is "against the state", "neutral" or "praising the state". Depending on the verdict of the model the members social credit is adjusted. Manual intervention can be done by admins, however, bot will take care of punishments and pardons automatically with respect to social credit. I plan to add more utility commands in the future.
- Clone Repository
git clone https://github.com/L0ad1n6/Banana-Bot
- Configure Discord Token
cd Banana-Bot
echo token=YOUR-TOKEN-HERE>.env
- Create Virtual Environment (Optional)
python -m venv ./venv
source ./venv/bin/activate
- Installing Dependencies
All of the project dependencies are in the requirements.txt file
pip install -r requirements.txt
- Running Code
For development nodemon is a very powerful tool:
npm install nodemon
nodemon --exec python src/main.py
For local deployment:
python src/main.py
For production I would advise using heroku
Type the characters "--" and then any command or command alias to run the command. Type "--help" for a list of commands help.
Name | Description |
---|---|
requirements.txt | Has all of the package requirements |
Procfile | Config file for heroku |
LICENSE | Holds license for bot |
.gitignore | Standard gitignore file to prevent unwanted files form being committed |
.prettierrc | Config file for prettier |
src | Contains all source code for project |
src/commands | All command related code is found in this directory |
src/data | Data such as member data, photos, dataset and ml model are stored here |
src/model | All code related to training the model are located in this directory |
src/main | Entrypoint to the code, pieces together all the different parts of the bot |
Licensed under the MIT License
Copyright (c) 2021 Altan Mehmet Ünver (L0ad1n6)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.