Comment out the social media post edits
This commit is contained in:
parent
75eb2fee26
commit
f8501677dd
50
app/bot.py
50
app/bot.py
@ -85,31 +85,31 @@ async def convert_heic_to_jpg(ctx):
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@bot.listen("on_message")
|
# @bot.listen("on_message")
|
||||||
async def fix_social_media_links(ctx):
|
# async def fix_social_media_links(ctx):
|
||||||
correct_domains = {
|
# correct_domains = {
|
||||||
"https://x.com": "vxtwitter",
|
# "https://x.com": "vxtwitter",
|
||||||
"https://www.x.com": "vxtwitter",
|
# "https://www.x.com": "vxtwitter",
|
||||||
"https://twitter.com": "vxtwitter",
|
# "https://twitter.com": "vxtwitter",
|
||||||
"https://www.twitter.com": "vxtwitter",
|
# "https://www.twitter.com": "vxtwitter",
|
||||||
"https://tiktok.com": "vxtiktok",
|
# "https://tiktok.com": "vxtiktok",
|
||||||
"https://www.tiktok.com": "vxtiktok",
|
# "https://www.tiktok.com": "vxtiktok",
|
||||||
}
|
# }
|
||||||
if ctx.author.id == bot.user.id:
|
# if ctx.author.id == bot.user.id:
|
||||||
return
|
# return
|
||||||
for k in correct_domains.keys():
|
# for k in correct_domains.keys():
|
||||||
if ctx.content.startswith(k) or ctx.content.startswith("www.{k}.com"):
|
# if ctx.content.startswith(k) or ctx.content.startswith("www.{k}.com"):
|
||||||
await ctx.channel.send(
|
# await ctx.channel.send(
|
||||||
"%s said:\n%s"
|
# "%s said:\n%s"
|
||||||
% (
|
# % (
|
||||||
ctx.author.mention,
|
# ctx.author.mention,
|
||||||
ctx.content.replace(k, "https://%s.com" % correct_domains[k]).split(
|
# ctx.content.replace(k, "https://%s.com" % correct_domains[k]).split(
|
||||||
"?"
|
# "?"
|
||||||
)[0],
|
# )[0],
|
||||||
)
|
# )
|
||||||
)
|
# )
|
||||||
await ctx.delete()
|
# await ctx.delete()
|
||||||
return
|
# return
|
||||||
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
|
Loading…
x
Reference in New Issue
Block a user