aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Amrou Bellalouna <[email protected]>2022-09-19 16:46:54 +0100
committerGravatar Amrou Bellalouna <[email protected]>2022-09-19 16:46:54 +0100
commita7663c56c360e5f6799edce67265f0d6415c8be4 (patch)
tree510a439d51acf5c76ff8b04cb66539c91c9e6a2c
parentsort the list of final rule numbers (diff)
return final list of rule numbers to be sent
-rw-r--r--bot/exts/info/information.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index 7e27ed31c..58f0764d8 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -3,7 +3,7 @@ import pprint
import textwrap
from collections import defaultdict
from textwrap import shorten
-from typing import Any, DefaultDict, Mapping, Optional, Tuple, Union
+from typing import Any, DefaultDict, List, Mapping, Optional, Tuple, Union
import rapidfuzz
from botcore.site_api import ResponseCodeError
@@ -518,7 +518,7 @@ class Information(Cog):
await self.send_raw_content(ctx, message, json=True)
@command(aliases=("rule",))
- async def rules(self, ctx: Context, *args: Optional[str]) -> None:
+ async def rules(self, ctx: Context, *args: Optional[str]) -> Optional[List[int]]:
"""
Provides a link to all rules or, if specified, displays specific rule(s).
@@ -575,6 +575,8 @@ class Information(Cog):
await LinePaginator.paginate(final_rules, ctx, rules_embed, max_lines=3)
+ return final_rule_numbers
+
async def setup(bot: Bot) -> None:
"""Load the Information cog."""