bot will now replace links even if the message is not only a link to a video

This commit is contained in:
Luke Robles 2022-05-17 09:24:14 -07:00
parent 4f039a45ba
commit 7cb079a87d
2 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,8 @@ async def on_ready():
@bot.listen("on_message")
async def fix_cdn_url(ctx):
# Ignore images
if ctx.content.endswith(("mp4", "mov")) and "media.discordapp.net" in ctx.content:
videos = ["mp4", "mov"]
if any(x in ctx.content for x in videos) and "media.discordapp.net" in ctx.content:
await ctx.delete()
await ctx.channel.send(
"%s said:\n%s"

View File

@ -6,7 +6,7 @@ replicaCount: 1
image:
# Overrides the image tag whose default is the chart appVersion.
tag: "200"
tag: "201"
repository: ldooks/dragon-bot
pullPolicy: IfNotPresent