aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jeremiah Boby <[email protected]>2019-06-23 20:50:55 +0100
committerGravatar GitHub <[email protected]>2019-06-23 20:50:55 +0100
commit5e16f4a52d59c73a04323e070e7b4a320e8c1e49 (patch)
tree2208ec7f8f8d79d7c160fd4a6dda442c019bb1d6
parentMerge pull request #373 from python-discord/off-topic-convert (diff)
Update off_topic_names.py
-rw-r--r--bot/cogs/off_topic_names.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/off_topic_names.py b/bot/cogs/off_topic_names.py
index 8fbddde4e..9b0f5d6c5 100644
--- a/bot/cogs/off_topic_names.py
+++ b/bot/cogs/off_topic_names.py
@@ -19,7 +19,7 @@ class OffTopicName(Converter):
@staticmethod
async def convert(ctx: Context, argument: str):
- allowed_characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?'`"
+ allowed_characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?'`-"
if not (2 <= len(argument) <= 96):
raise BadArgument("Channel name must be between 2 and 96 chars long")
@@ -32,7 +32,7 @@ class OffTopicName(Converter):
# Replace invalid characters with unicode alternatives.
table = str.maketrans(
- allowed_characters, '๐– ๐–ก๐–ข๐–ฃ๐–ค๐–ฅ๐–ฆ๐–ง๐–จ๐–ฉ๐–ช๐–ซ๐–ฌ๐–ญ๐–ฎ๐–ฏ๐–ฐ๐–ฑ๐–ฒ๐–ณ๐–ด๐–ต๐–ถ๐–ท๐–ธ๐–นวƒ๏ผŸโ€™โ€™'
+ allowed_characters, '๐– ๐–ก๐–ข๐–ฃ๐–ค๐–ฅ๐–ฆ๐–ง๐–จ๐–ฉ๐–ช๐–ซ๐–ฌ๐–ญ๐–ฎ๐–ฏ๐–ฐ๐–ฑ๐–ฒ๐–ณ๐–ด๐–ต๐–ถ๐–ท๐–ธ๐–นวƒ๏ผŸโ€™โ€™-'
)
return argument.translate(table)