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.

Owner
Alec Ibarra
Texas A&M University - Electrical Engineering
Alec Ibarra
This is a simple bot for running Python code through Discord

Python Code Runner Discord Bot This is a simple bot for running Python code through Discord. It was originally developed for the Beginner.Codes Discor

beginner.py 1 Feb 14, 2022
Basic Discord python bot

#How to Create a Discord Bot Account In order to work with the Python library and the Discord API, we must first create a Discord Bot account. Here ar

Tustus 1 Oct 13, 2021
Code for paper "Adversarial score matching and improved sampling for image generation"

Adversarial score matching and improved sampling for image generation This repo contains the official implementation for the ICLR 2021 paper Adversari

Alexia Jolicoeur-Martineau 114 Dec 11, 2022
A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place

A simple Discord Bot A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place. We

1 Jan 24, 2022
Grocy-create-product - A script supports the batch creation of new products in Grocy

grocy-create-product This script supports the batch creation of new products in

André Heuer 6 Jul 28, 2022
Google Translater v2

Google_Translater_V2 Features Supporting 100 More Languages You can Set Your Custom Languages Supporting in Group Configs TG_BOT_TOKEN - Get bot token

Lntechnical 31 Nov 12, 2022
Tinkoff social pulse api wrapper

Tinkoff social pulse api wrapper

Semenov Artur 9 Dec 20, 2022
Python client for the LightOn Muse API

lightonmuse Python bindings to production-ready intelligence primitives powered by state-of-the-art language models. Create. Process. Understand. Lear

LightOn 12 Apr 10, 2022
A Simple, Easy to use and light-weight Pyrogram Userbot

Nexa Userbot A Simple, Easy to use and light-weight Pyrogram Userbot Deploy With Heroku With VPS (Local) Clone Nexa-Userbot repository git clone https

I'm Not A Bot #Left_TG 28 Nov 12, 2022
A Python 2.7/3.x module for Amcrest Cameras using the SDK HTTP API.

A Python 2.7/3.x module for Amcrest Cameras using the SDK HTTP API. Amcrest and Dahua devices share similar firmwares. Dahua Cameras and NVRs also work with this module.

Marcelo Moreira de Mello 176 Dec 21, 2022
This is a open source discord bot project

pythonDiscordBot This is a open source discord bot project #based on the MAX A video: https://www.youtube.com/watch?v=jHZlvRr9KxM Prerequisites Python

Edson Holanda Teixeira Junior 3 Oct 11, 2021
Telegram-Voice Recoginiton Project (Python)

Telegram-Voice Recoginiton Project (Python) It is a telegram bot that analyses voice messages and convert it to text and reply back response on bot's

Krishnadev P Melevila 1 Jan 28, 2022
Demo of using Telegram to send alert message

MIAI_Telegram Demo of using Telegram to send alert message Video link: https://youtu.be/oZ9CsIrlMgg #MìAI Fanpage: http://facebook.com/miaiblog Group

4 Jun 20, 2021
🛒 Bot de lista de compras compartilhada para o Telegram

Lista de Compras Lista de compras de Cuducos e Flávia. Comandos do bot Comando Descrição /add item Adiciona item à lista de compras /remove item

Eduardo Cuducos 4 Jan 15, 2022
Open API to list Viet Nam administrative divisions

Viet Nam province API Homepage: https://provinces.open-api.vn This is online tool to let my VietnamProvinces library reach more users. VietnamProvince

Nguyễn Hồng Quân 52 Dec 05, 2022
Red-mail - Advanced email sending library for Python

Red Mail Next generation email sender What is it? Red Mail is an advanced email

Mikael Koli 313 Jan 08, 2023
A small python script which runs a speedtest using speedtest.net and inserts it into a Google Docs Spreadsheet.

speedtest-google-sheets This is a small python script which runs a speedtest using speedtest.net and inserts it into a Google Docs Spreadsheet. Setup

marie 2 Feb 10, 2022
Pls give vaccine.

Pls Give Vaccine A script to spam yourself with vaccine notifications. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents A

Rohan Mukherjee 3 Oct 27, 2021
For Help/Questions Join in discord

Simple-Nitro-Generator-Source Must have installed python! Discord: $MartoBossX#7777 Server: https://discord.gg/ErynDxTV5Y DONATE: (Crypto) BTC: bc1qg8

1 Jan 08, 2022
Auto Join: A GitHub action script to automatically invite everyone to the organization who comment at the issue page.

Auto Invite To Org By Issue Comment A GitHub action script to automatically invite everyone to the organization who comment at the issue page. What is

Max Base 6 Jun 08, 2022