|
|
@ -29,16 +29,12 @@ TWITTER_COLOR = 0x1da1f2
|
|
|
|
YOUTUBE_COLOR = 0xff0000
|
|
|
|
YOUTUBE_COLOR = 0xff0000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger = logging.getLogger('discord')
|
|
|
|
|
|
|
|
logger.addHandler(logging.StreamHandler())
|
|
|
|
|
|
|
|
logger.setLevel(logging.INFO)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config = configparser.ConfigParser()
|
|
|
|
config = configparser.ConfigParser()
|
|
|
|
config.read(os.getenv('CHEDDAR_KNIGHT_CONFIG', 'settings.cfg'))
|
|
|
|
config.read(os.getenv('CHEDDAR_KNIGHT_CONFIG', 'settings.cfg'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
staging = config.getboolean('General', 'staging', fallback=False)
|
|
|
|
staging = config.getboolean('General', 'staging', fallback=False)
|
|
|
|
|
|
|
|
debug = config.getboolean('General', 'debug', fallback=False)
|
|
|
|
storage_path = config.get('General', 'storage_path')
|
|
|
|
storage_path = config.get('General', 'storage_path')
|
|
|
|
|
|
|
|
|
|
|
|
token = config.get('Discord', 'token')
|
|
|
|
token = config.get('Discord', 'token')
|
|
|
@ -53,6 +49,11 @@ yt_api_key = config.get('YouTube', 'api_key')
|
|
|
|
yt_channel_id = config.get('YouTube', 'channel_id')
|
|
|
|
yt_channel_id = config.get('YouTube', 'channel_id')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger = logging.getLogger('discord')
|
|
|
|
|
|
|
|
logger.addHandler(logging.StreamHandler())
|
|
|
|
|
|
|
|
logger.setLevel(logging.DEBUG if debug else logging.INFO)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Bot(discord.Client):
|
|
|
|
class Bot(discord.Client):
|
|
|
|
def __init__(self):
|
|
|
|
def __init__(self):
|
|
|
|
self.commands = (
|
|
|
|
self.commands = (
|
|
|
|