mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
Make controls in menu() optional (#5678)
* Make `controls` in `menu()` optional You might wonder, shouldn't we pass `None` to functions from controls? No, we shouldn't because when `None` is passed, only DEFAULT_CONTROLS can be used and that means that the length of pages list won't change. * Update usage in core and core cogs * Add missing docstrings to `redbot.core.utils.menus` module
This commit is contained in:
@@ -9,7 +9,7 @@ import discord
|
||||
from redbot.core import Config, commands, checks
|
||||
from redbot.core.i18n import Translator, cog_i18n
|
||||
from redbot.core.utils.chat_formatting import box, pagify
|
||||
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
|
||||
from redbot.core.utils.menus import menu
|
||||
|
||||
from redbot.core.bot import Red
|
||||
from .alias_entry import AliasEntry, AliasCache, ArgParseError
|
||||
@@ -185,7 +185,7 @@ class Alias(commands.Cog):
|
||||
if len(alias_list) == 1:
|
||||
await ctx.send(alias_list[0])
|
||||
return
|
||||
await menu(ctx, alias_list, DEFAULT_CONTROLS)
|
||||
await menu(ctx, alias_list)
|
||||
|
||||
@commands.group()
|
||||
async def alias(self, ctx: commands.Context):
|
||||
|
||||
Reference in New Issue
Block a user