Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.09k stars 2.35k forks source link

Prefix per server #2367

Closed itsTheFae closed 6 months ago

itsTheFae commented 7 months ago

Description

This PR adds support for setting a command prefix per guild/server. It adds one new option EnableOptionsPerGuild and a new command setprefix to manage the feature.
This feature allows just about anything without spaces to be set as a command prefix, including Emoji. Only one verb cannot be set, as setprefix clear is used to clear any currently set prefix. The default prefix in options.ini is used when no server-specific prefix is set. If per-guild options are not enabled the setprefix command will raise an error.

Additionally, this feature will remember a limited number of prefix changes so the clean command can take care of messages prior to a prefix change. This history of prefixes does not persist through restarts.

Related issues (if applicable)

2288

itsTheFae commented 6 months ago

This should be fully ready to go now. :+1: