From 50a5c3d94af3a8aae2d54f6f2d67a42e3439d3b1 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Tue, 9 Jan 2018 13:29:12 -0600 Subject: [PATCH] allow supplying max_messages to the discord bot --- bot/__init__.py | 3 ++- hitomi/settings.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/__init__.py b/bot/__init__.py index 2421c8f..cbf1a1d 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -1,6 +1,7 @@ """Discord bot Hitomi and its library functions.""" from discord.ext import commands +from django.conf import settings BOT_DESCRIPTION = "A simple Discord bot." -hitomi = commands.Bot(command_prefix='!', description=BOT_DESCRIPTION) +hitomi = commands.Bot(command_prefix='!', description=BOT_DESCRIPTION, max_messages=settings.DISCORD_BOT_MAX_MESSAGES) diff --git a/hitomi/settings.py b/hitomi/settings.py index 5d4f652..9b7d185 100644 --- a/hitomi/settings.py +++ b/hitomi/settings.py @@ -127,6 +127,8 @@ STATIC_URL = '/static/' # default bot settings DISCORD_BOT_TOKEN = 'token' + +DISCORD_BOT_MAX_MESSAGES = 5000 LOGGER_BASE_DIR = './logs' WEATHER_WEATHER_UNDERGROUND_API_KEY = 'key'