Auto correct tiktok links to be vxtiktok so they play within discord
This commit is contained in:
parent
edbcf78a35
commit
8d8d373435
14
app/bot.py
14
app/bot.py
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user