Add botprefix config option
This commit is contained in:
parent
d425b61755
commit
212e10d9a7
2 changed files with 7 additions and 5 deletions
|
@ -11,6 +11,10 @@
|
|||
# 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).
|
||||
#
|
||||
# - botprefix
|
||||
# This is the prefix for commands when not using slash-commands.
|
||||
|
||||
[General]
|
||||
bottoken=BOTTOKEN_HERE
|
||||
botprefix=.
|
||||
|
|
|
@ -11,9 +11,6 @@ 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)
|
||||
|
||||
|
@ -48,10 +45,11 @@ config.read('bot.ini')
|
|||
|
||||
|
||||
bottoken = config['General']['bottoken']
|
||||
botprefix = config['General']['botprefix']
|
||||
|
||||
|
||||
# Setting up commands.Bot
|
||||
bot = commands.Bot(command_prefix='.', description=description, intents=intents)
|
||||
bot = commands.Bot(command_prefix=botprefix, description=description, intents=intents)
|
||||
|
||||
|
||||
@bot.event
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue