Skip to content

use _human_join util function in BaseChannelTransformer #10175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions discord/app_commands/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from ..abc import GuildChannel
from ..threads import Thread
from ..enums import Enum as InternalEnum, AppCommandOptionType, ChannelType, Locale
from ..utils import MISSING, maybe_coroutine
from ..utils import MISSING, maybe_coroutine, _human_join
from ..user import User
from ..role import Role
from ..member import Member
Expand Down Expand Up @@ -631,7 +631,7 @@ def __init__(self, *channel_types: Type[Any]) -> None:
display_name = channel_types[0].__name__
types = CHANNEL_TO_TYPES[channel_types[0]]
else:
display_name = '{}, and {}'.format(', '.join(t.__name__ for t in channel_types[:-1]), channel_types[-1].__name__)
display_name = _human_join([t.__name__ for t in channel_types])
types = []

for t in channel_types:
Expand Down
Loading