From aa2f9685c29d46a2666654c545d4461763c903b6 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Wed, 23 Feb 2022 00:59:09 +0000 Subject: Alter docstrings to look better in autodocs --- botcore/utils/channel.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'botcore/utils/channel.py') diff --git a/botcore/utils/channel.py b/botcore/utils/channel.py index 7e0fc387..6a630c94 100644 --- a/botcore/utils/channel.py +++ b/botcore/utils/channel.py @@ -1,4 +1,4 @@ -"""Utilities for interacting with discord channels.""" +"""Useful helper functions for interacting with various discord.py channel objects.""" import discord from discord.ext.commands import Bot @@ -9,7 +9,16 @@ log = loggers.get_logger(__name__) def is_in_category(channel: discord.TextChannel, category_id: int) -> bool: - """Return True if `channel` is within a category with `category_id`.""" + """ + Return whether the given channel has the category_id. + + Args: + channel: The channel to check. + category_id: The category to check for. + + Returns: + A bool depending on whether the channel is in the category. + """ return getattr(channel, "category_id", None) == category_id -- cgit v1.2.3