update lmgtfy
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 17s

This commit is contained in:
Nexus 2024-05-12 23:05:41 +01:00
parent bd477d2a79
commit f4411022b9
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -366,9 +366,9 @@ class AutoResponder(commands.Cog):
extra = [attachment.url for attachment in reaction.message.attachments]
if self.allow_on_demand_transcoding:
await self.transcode_hevc_to_h264(reaction.message, additional=extra)
if isinstance(reaction.emoji, (discord.PartialEmoji, discord.Emoji)):
if reaction.emoji.name == "google_it" and reaction.message.id not in self.lmgtfy_cache:
url = "https://letmegooglethat.com/?q=" + quote_plus(reaction.message.content)
if reaction.emoji == discord.PartialEmoji.from_str("\U0001f310"):
if reaction.message.id not in self.lmgtfy_cache:
url = "https://lmgtfy2.com/?q=" + quote_plus(reaction.message.content)
m = await reaction.message.reply(f"[Here's the answer to your question]({url})")
await m.edit(suppress=True)
self.lmgtfy_cache.append(reaction.message.id)