diff --git a/bot.ini.example b/bot.ini.example index 6913281..ebc443f 100644 --- a/bot.ini.example +++ b/bot.ini.example @@ -11,12 +11,6 @@ # try searching the internet for "How to create a Discord bot token" or # visit: https://discordpy.readthedocs.io/en/latest/discord.html # Also don't forget to invite the bot onto your server(s). -# -# - botprefixes -# This is the prefix for commands when not using slash-commands. -# Can also contain several prefixes, define it like: botprefixes=['!', '?','.'] -# (list of strings) [General] -bottoken=BOTTOKEN_HERE -botprefixes=. +bottoken=BOTTOKEN_HERE \ No newline at end of file diff --git a/pybot-f.py b/pybot-f.py index c073fe5..bee0bf2 100644 --- a/pybot-f.py +++ b/pybot-f.py @@ -11,6 +11,9 @@ from logging import handlers # Logging +#loghandler = logging.FileHandler(filename='bot.log', encoding='utf-8', mode='w') +#discord.utils.setup_logging(handler=loghandler) + logger = logging.getLogger('discord') logger.setLevel(logging.INFO) @@ -45,20 +48,10 @@ config.read('bot.ini') bottoken = config['General']['bottoken'] -botprefixes = config['General']['botprefixes'] - - -def get_prefixes(bot, message): - """ - For setting the bots prefixes in addition to mentions. - """ - - prefixes = botprefixes # Can be a list of strings - return commands.when_mentioned_or(*prefixes)(bot, message) # Setting up commands.Bot -bot = commands.Bot(command_prefix=get_prefixes, description=description, intents=intents) +bot = commands.Bot(command_prefix='.', description=description, intents=intents) @bot.event