Adding an on_listen method to correct discord video URLs
This commit is contained in:
parent
4392092199
commit
69b0a7ab0f
@ -47,6 +47,13 @@ async def on_ready():
|
|||||||
await bot.get_channel(152921472304676865).send("I have reconnected")
|
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')
|
@bot.command(name='shoo')
|
||||||
async def shoo(ctx):
|
async def shoo(ctx):
|
||||||
if ctx.message.author.id != 144986109804412928:
|
if ctx.message.author.id != 144986109804412928:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user