mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-08 04:08:56 -05:00
[V3 Help formatter] Better name-as-prefix handling (#1823)
* prefix handling * actually, integration role isn't a valid way
This commit is contained in:
parent
7d4946560d
commit
fd7088de1a
@ -40,7 +40,7 @@ from redbot.core.utils.chat_formatting import pagify, box
|
|||||||
from redbot.core.utils import fuzzy_command_search
|
from redbot.core.utils import fuzzy_command_search
|
||||||
|
|
||||||
|
|
||||||
EMPTY_STRING = u"\u200b"
|
EMPTY_STRING = "\u200b"
|
||||||
|
|
||||||
_mentions_transforms = {"@everyone": "@\u200beveryone", "@here": "@\u200bhere"}
|
_mentions_transforms = {"@everyone": "@\u200beveryone", "@here": "@\u200bhere"}
|
||||||
|
|
||||||
@ -60,6 +60,12 @@ class Help(formatter.HelpFormatter):
|
|||||||
def pm_check(self, ctx):
|
def pm_check(self, ctx):
|
||||||
return isinstance(ctx.channel, discord.DMChannel)
|
return isinstance(ctx.channel, discord.DMChannel)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def clean_prefix(self):
|
||||||
|
maybe_member = self.context.guild.me if self.context.guild else self.context.bot.user
|
||||||
|
pretty = f"@{maybe_member.display_name}"
|
||||||
|
return self.context.prefix.replace(maybe_member.mention, pretty)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def me(self):
|
def me(self):
|
||||||
return self.context.me
|
return self.context.me
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user