/scapecord.py

Scapecord.py is scapegoat of a bot written in discord.py.

Primary LanguagePythonMIT LicenseMIT

scapecord.py

scapecord.py is a "construction sign" discord bot written in discord.py.

mark_koujichu

When your bot is under maintenance, This bot becomes a "Scapegoat".

  • Set bot state "Do not disturb"
  • Send custom response when the bot is mensioned
  • Apply to both mention and custom prefix-command(ex: $start, $help, etc)

Example

Code

config.py

# coding: UTF-8
token = 'YOUR_DISCORD_TOKEN'
response = "Sorry, I'm down for maintenance now. Please wait a moment."
bot_command_prefix = '$'

main.py

# coding: UTF-8
import scapecord
scapecord.run()

ScreenShot

Status

20190327_185215

Conversation

20190327_184359

Usage

Clone this repository

$ git clone git@github.com:cod-sushi/scapecord.py.git

Install dependencies

$ cd scapecord.py
$ pip install -r requirement.txt

Set up configuration

You can use example/. There are sample code and config.py.

Create config.py

# config.py
# coding: UTF-8

token = 'YOUR_DISCORD_TOKEN'
response = "Sorry, I'm down for maintenance now. Please wait a moment."
# If your bot is discord.ext.commands.Bot:
bot_command_prefix = '$'
# If your bot is discord.Client:
bot_command_prefix = None

Create main.py

$ vim main.py
# coding: UTF-8
import scapecord
scapecord.run()

Run

$ python main.py