Add buttons to help (#5634)

Co-authored-by: Zephyrkul <23347632+Zephyrkul@users.noreply.github.com>
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
TrustyJAID
2022-10-12 08:29:10 -06:00
committed by GitHub
parent 4158244117
commit aaeb1b5daa
4 changed files with 362 additions and 32 deletions

View File

@@ -120,7 +120,7 @@ class Red(
help__page_char_limit=1000,
help__max_pages_in_guild=2,
help__delete_delay=0,
help__use_menus=False,
help__use_menus=0,
help__show_hidden=False,
help__show_aliases=True,
help__verify_checks=True,
@@ -1045,6 +1045,16 @@ class Red(
await self._schema_1_to_2()
schema_version += 1
await self._config.schema_version.set(schema_version)
if schema_version == 2:
await self._schema_2_to_3()
schema_version += 1
await self._config.schema_version.set(schema_version)
async def _schema_2_to_3(self):
log.info("Migrating help menus to enum values")
old = await self._config.help__use_menus()
if old is not None:
await self._config.help__use_menus.set(int(old))
async def _schema_1_to_2(self):
"""