Adding an on_listen method to correct discord video URLs

This commit is contained in:
Luke Robles 2021-09-06 09:18:14 -07:00
parent 4d21244a98
commit 183036eb84

View File

@ -47,6 +47,13 @@ async def on_ready():
await bot.get_channel(152921472304676865).send("I have reconnected")
@bot.listen('on_message')
async def on_message(ctx):
if 'media.discordapp.net' in ctx.content:
await ctx.delete()
await ctx.channel.send(ctx.content.replace('media.discordapp.net', 'cdn.discordapp.com'))
return
@bot.command(name='shoo')
async def shoo(ctx):
if ctx.message.author.id != 144986109804412928: