PhasecoreX / docker-red-discordbot

The newest Red-Discordbot in a convenient container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use or add multiple prefixes

MockLogic opened this issue · comments

Normal use of Red Bot lets you set multiple Prefixes such as ! . ~ "Bot please " [p] but all my attempts to load the docker container with more than one Prefix listed have resulted in errors. Moreover, when I try to use a command to change or add to the prefixes once the bot is loaded, they bot responds as if the command was accepted but only the symbol indicated in the docker container command works. I also tried booting container without a specified symbol, assuming it would simply retain the existing one from the data folder, but that also failed to boot.

I figure I'm either doing it wrong, or it's not supported.

Without seeing any of these error logs, I can only offer some basic help. You have a couple of options here in regards to prefixes:

  1. You can additionally specify PREFIX2, PREFIX3, PREFIX4, and PREFIX5 if you want to still use environment variables to configure the bot and don't need to use multi word prefixes.

  2. You can remove the TOKEN and PREFIX environment variables, then follow the instructions in the readme for The Traditional Setup Process. After you've done that, you can use the [p]set prefix command in the bot to manage your prefixes.

  3. You can wait for Cog-Creators/Red-DiscordBot#3481 to be completed, the next Red-DiscordBot version to include that fix, and then me rewriting some code in order to have the environment variables save to the bots config. That way, a user can start first with the environment variables, and then remove them for subsequent restarts. They can also use the [p]set prefix command at that point.

The environment variables provided an easy way for a bot owner to get set up very quickly. Unfortunately, it seems that it completely disables being able to change the prefix from the bot (I didn't know this, but it makes sense). I'll leave this issue open until I implement the fix in the third option, assuming the issue for it is fixed.

I think option 3 sounds good long term and in the mean time I'll use the extra PREFIX2(+) environmental variables, along with EXTRA_ARGS --mentionable.

Thank you!

Red-DiscordBot 3.3.1 was just released, and I have updated this image to implement option 3.

When PREFIX (plus the other ones) or TOKEN are specified, they are saved to the bots config. That way, you can remove those environment variables and the bot will still start correctly. That also allows you to use the [p]set prefix command.

Pull the latest image and try it out! Enjoy!

Option 3 works for me just as you indicated. I rebuild the container, loaded it once with the old PREFIX specified, then reloaded without the PREFIX specified and it retained the previous ones. I was then able to set things via bot commands in Discord. I haven't tested the Token, because I don't see a good reason to mess with it. Thank you!