From 2f97a93c5607cc8fad98a126d0f313ad36e8a05d Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:34:22 -0700 Subject: [PATCH] replace twitter.com with fxtwitter.com --- app/bot.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/bot.py b/app/bot.py index 9bc2c1cc..b25479a3 100755 --- a/app/bot.py +++ b/app/bot.py @@ -50,6 +50,20 @@ async def fix_cdn_url(ctx): return +@bot.listen("on_message") +async def fix_twitter_url(ctx): + if "https://twitter.com" in ctx.content: + await ctx.delete() + await ctx.channel.send( + "%s said:\n\n%s" + % ( + ctx.author.mention, + ctx.content.replace("twitter.com", "fxtwitter.com"), + ) + ) + return + + @bot.listen("on_message") async def convert_heic_to_jpg(ctx): from cmagick import cmagick