bot will now replace links even if the message is not only a link to a video
This commit is contained in:
parent
4f039a45ba
commit
7cb079a87d
@ -36,7 +36,8 @@ async def on_ready():
|
|||||||
@bot.listen("on_message")
|
@bot.listen("on_message")
|
||||||
async def fix_cdn_url(ctx):
|
async def fix_cdn_url(ctx):
|
||||||
# Ignore images
|
# 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.delete()
|
||||||
await ctx.channel.send(
|
await ctx.channel.send(
|
||||||
"%s said:\n%s"
|
"%s said:\n%s"
|
||||||
|
@ -6,7 +6,7 @@ replicaCount: 1
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: "200"
|
tag: "201"
|
||||||
repository: ldooks/dragon-bot
|
repository: ldooks/dragon-bot
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user