mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 10:03:40 +01:00
Use the 𝕏 instead of X
This commit is contained in:
parent
ff6f324ddf
commit
b60d39c74a
1 changed files with 12 additions and 14 deletions
|
@ -197,21 +197,19 @@ class Events(commands.Cog):
|
|||
elif "boris" in words and (file := assets / "boris.jpg").exists():
|
||||
await message.reply(file=discord.File(file), delete_after=60)
|
||||
elif "twitter" in words or "vxtwitter" in words:
|
||||
new_words = []
|
||||
for word in words:
|
||||
if word.lower() == "twitter":
|
||||
new_words.append("~~%s~~ **X**" % word)
|
||||
else:
|
||||
new_words.append(word)
|
||||
new_content = " ".join(new_words)
|
||||
new_content = re.sub(
|
||||
r"(^|\W+)twitter",
|
||||
lambda m: f'~~{m.group()}~~ \U0001D54F',
|
||||
message.content,
|
||||
flags=re.IGNORECASE
|
||||
)
|
||||
if len(new_content) > 2000:
|
||||
new_words = []
|
||||
for word in words:
|
||||
if word.lower() == "twitter":
|
||||
new_words.append("**X**")
|
||||
else:
|
||||
new_words.append(word)
|
||||
new_content = " ".join(new_words)
|
||||
new_content = re.sub(
|
||||
r"(^|\W+)twitter",
|
||||
'\U0001D54F',
|
||||
message.content,
|
||||
flags=re.IGNORECASE
|
||||
)
|
||||
new_content = new_content.replace("vxtwitter", "fixupx")
|
||||
await message.reply(new_content, delete_after=300)
|
||||
|
||||
|
|
Loading…
Reference in a new issue