From 7cb079a87d85e960324d1f918366e658bfeb3a6d Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Tue, 17 May 2022 09:24:14 -0700 Subject: [PATCH] bot will now replace links even if the message is not only a link to a video --- app/bot.py | 3 ++- helm/values.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/bot.py b/app/bot.py index 2e1e8332..81d75fd4 100755 --- a/app/bot.py +++ b/app/bot.py @@ -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" diff --git a/helm/values.yaml b/helm/values.yaml index 66bd7772..5714577b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -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