This project is based on discord.py and is meant to be a 'Quick Start Bot' to cut down on the time it takes to write complex discord bots.

Overview

Generic-DiscordBot

This project is based on discord.py and is meant to be a 'Quick Start Bot' to cut down on the time it takes to write complex discord bots.

NOTE: Written for python 3. Last updated [2020-12-20].


Features:

  • Full multi-server support
    • Per-server bot settings
    • Per-server command prefix
    • Global bot settings
    • Ban a user globally or a guild from using the bot
  • Useful bot admin utilites
    • Get invite to requested server
    • Have the bot echo your message
    • Detailed logging
    • Automated testing
  • Easy to add new commands and games
    • Add command aliases
    • Define permission levels
    • Set commands to DM only
    • Add command descriptions and usage information
    • No need to worry about restarting bot during any running games
  • Custom help messages based on user's permission level (superadmin, server admin, user)
  • Get notified if the bot is unable to access the database

And any other bot/server specific features you wish to write!


Version 1.0 Checklist:

  • Broadcast message to bot server admins
  • Switch help and settings commands to use interactive embeds
  • Enable/disable commands on global level
  • Enable/disable commands on server level
  • Restrict commands to certain channels on server level
  • Chunk and zip log files if size exceeds limit

Setup Instructions:

  1. Install Python Dependencies:

    $ python3 -m pip install discord.py
    $ python3 -m pip install pymysql
    $ python3 -m pip install asgiref
    
  2. Install MySQL:

  3. Place bot files directory in '/usr/local/lib/':

    • After placing the files, make update the file permissions
      $ sudo chown root:root /usr/local/lib/Generic-DiscordBot/src/DB_main.py
      $ sudo chmod 644 /usr/local/lib/Generic-DiscordBot/src/DB_main.py
      
  4. Set up discord bot user

    • Go to the discord developer portal create an application.
    • Create a bot user for your application.
    • Enable the 'Server Members Intent' setting under the 'Privileged Gateway Intents' section.
  5. Update the bot's settings:

    • Update the prefs.json file found in the /res folder.
    • If not present run the bot once to generate both the folder and file.
    • Bot tester client token is only necessary when running the tester bot.
  6. Allow bot's stop and start to be handled by systemd:

    • Place 'generic_bot.service' in '/etc/systemd/system/'
    • Then run:
      $ sudo chown root:root /etc/systemd/system/generic_bot.service
      $ sudo chmod 644 /etc/systemd/system/generic_bot.service
      
      $ sudo systemctl daemon-reload
      $ sudo systemctl enable generic_bot
      

Visit here to learn more about systemd and unit files

  1. Check if the bot's service is enabled properly:

    $ sudo systemctl list-unit-files | grep generic_bot
    generic_bot.service                enabled
    
  2. Start / stop the bot's service:

    $ sudo systemctl start generic_bot
    $ sudo systemctl stop generic_bot
    $ sudo systemctl restart generic_bot
    $ sudo systemctl status generic_bot
    

And you're done! The bot automatically creates all of the folders, files, and database tables it uses as needed.

You might also like...
This is telegram bot to generate string session for using user bots. You can see live bot in https://telegram.dog/string_session_Nsbot

TG String Session Generate Pyrogram String Session Using this bot. Demo Bot: Configs: API_HASH Get from Here. API_ID Get from Here. BOT_TOKEN Telegram

A Google Charts API for Python, meant to be used as an alternative to matplotlib.
A Google Charts API for Python, meant to be used as an alternative to matplotlib.

GooPyCharts A Google Charts API for Python 2 and 3, meant to be used as an alternative to matplotlib. Syntax is similar to MATLAB. The goal of this pr

Music bot because Octave is down and I can : )
Music bot because Octave is down and I can : )

Chords On a mission to build the best Discord Music Bot View Demo · Report Bug · Request Feature Table of Contents About The Project Built With Gettin

Python Bot that attends classes, answers polls, and then again waits for classes to start.
Python Bot that attends classes, answers polls, and then again waits for classes to start.

LPU_myclass_Bot LPU_myclass_Bot is a Python bot that waits for class to start, attends class, answers polls, and then again waits for another class to

A simple telegram bot that takes a list of files sent by the user and returns them 7zipped

A simple telegram bot that takes a list of files sent by the user and returns them 7zipped

Zipper-s-Father - A simple telegram bot that takes a list of files sent by the user and returns them zipped

ZIP files telegram bot A simple telegram bot that takes a list of files sent by

A frame to create discord bots (for myself) that uses cogs, JSON, activities, and more.

dpy-frame A frame to create discord bots (for myself) that uses cogs, JSON, activities, and more. NOTE: Documentation is incomplete, so please wait un

Often discord bots just die, and we hardly find one that is durable
Often discord bots just die, and we hardly find one that is durable

Muitas vezes bots do discord simplesmente morrem, e dificilmente achamos um que seja durável. Então porque não ter um próprio para emergências? Como c

Discord spam bots with multiple account support and more
Discord spam bots with multiple account support and more

Discord spam bots with multiple account support and more. PLEASE READ EVERYTHING BEFORE WRITING AN ISSUE!! Server Messages Text Image Dm Messages Text

Owner
Alec Ibarra
Texas A&M University - Electrical Engineering
Alec Ibarra
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

Vɪᴠᴇᴋ 47 Dec 29, 2022
A cut down version of QUANT containing just the model in Python (QUANTPy)

A cut down version of QUANT containing just the model in Python (QUANTPy)

null 2 Apr 15, 2022
Start multiple bots using one script. VK RAID BOTNET

MultiRaidBotnet Start multiple bots using one script. VK RAID BOTNET Русский launcher.py - главный скрипт, запускающий весь ботнет config.py - в нём х

null 2 Jul 22, 2022
AWS Quick Start Team

EKS CDK Quick Start (in Python) DEVELOPER PREVIEW NOTE: Thise project is currently available as a preview and should not be considered for production

AWS Quick Start 83 Sep 18, 2022
AWS Glue PySpark - Apache Hudi Quick Start Guide

AWS Glue PySpark - Apache Hudi Quick Start Guide Disclaimer: This is a quick start guide for the Apache Hudi Python Spark connector, running on AWS Gl

Gabriel Amazonas Mesquita 8 Nov 14, 2022
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022
Easy & powerful bot to check if your all Telegram bots are working or not. This bot status bot updates every 45 minutes & runs for 24x7 hours.

PowerfulBotStatus-IDN-C-X Easy & powerful bot to check if your all Telegram bots are working or not. This bot status bot updates every 45 minutes & ru

IDNCoderX 5 Oct 6, 2022
An almost dependency-less, synchronous Discord gateway library meant for my personal use

An almost dependency-less, synchronous Discord gateway library meant for my personal use.

h0nda 4 Feb 5, 2022
A fork of discord.py meant to replace it

Texus A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and

Texus 1 Nov 18, 2021
A template that everyone can use for the start of their discord bot

Python Discord Bot Template This repository is a template that everyone can use for the start of their discord bot. When I first started creating my d

null 2 Nov 1, 2021