Auto correct tiktok links to be vxtiktok so they play within discord

This commit is contained in:
Luke Robles 2023-08-18 14:34:47 -07:00
parent edbcf78a35
commit 8d8d373435

View File

@ -114,6 +114,20 @@ async def annoy_jason(ctx):
return return
@bot.listen("on_message")
async def fix_tiktok_links(ctx):
if "https://www.tiktok.com/t/" in ctx.content:
await ctx.channel.send(
"%s said:\n%s"
% (
ctx.author.mention,
ctx.content.replace("tiktok", "vxtiktok"),
)
)
await ctx.delete()
return
@bot.event @bot.event
async def on_command_completion(ctx): async def on_command_completion(ctx):
channel = bot.get_channel(826547484632678453) channel = bot.get_channel(826547484632678453)