Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.

Commit

Permalink
[linkquoter] prevent extra links appearing on quoted embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
phenom4n4n committed Jun 9, 2023
1 parent ed7bf43 commit 2c901c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ Once the bot is installed, run the following command in Discord:
| Baron | 1.2.4 | <details><summary>Tools for managing guild joins and leaves.</summary>Tools for managing guild joins and leaves.</details> | PhenoM4n4n, DragDev Studios, and KableKompany |
| Connect4 | 1.1.0 | <details><summary>Play Connect 4 in Discord!</summary>Play Connect 4 in Discord!</details> | Benjamin Mintz, flare, and PhenoM4n4n |
| CustomPing | 1.0.0 | <details><summary>Creates a custom ping embed to display latency statistics.</summary>Creates a custom ping embed to display latency statistics.</details> | PhenoM4n4n |
| DisboardReminder | 1.3.7 | <details><summary>Set a reminder to bump on Disboard.</summary>Set a reminder to bump on Disboard.</details> | PhenoM4n4n |
| DisboardReminder | 1.4.0 | <details><summary>Set a reminder to bump on Disboard.</summary>Set a reminder to bump on Disboard.</details> | PhenoM4n4n |
| EmbedUtils | 1.6.1 | <details><summary>Create, post, and store embeds</summary>Create, post, and store embeds.</details> | PhenoM4n4n |
| ForceMention | 1.0.0 | <details><summary>Mention unmentionables</summary>Mentions roles that are unmentionable</details> | Bobloy and PhenoM4n4n |
| LinkQuoter | 1.2.0 | <details><summary>Quote Discord message links.</summary>Quote Discord message links.</details> | PhenoM4n4n |
| LinkQuoter | 1.2.1 | <details><summary>Quote Discord message links.</summary>Quote Discord message links.</details> | PhenoM4n4n |
| Lock | 1.1.5 | <details><summary>Lock channels</summary>Lock channels or the whole server</details> | PhenoM4n4n |
| PermissionsLocker | 1.3.0 | <details><summary>Force permissions for the bot.</summary>Lock bot commands to a certain permissions set.</details> | PhenoM4n4n |
| PfpImgen | 1.1.1 | <details><summary>Make images from avatars!</summary>Make images from avatars!</details> | PhenoM4n4n |
Expand Down
7 changes: 4 additions & 3 deletions linkquoter/linkquoter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import asyncio
import logging
from copy import deepcopy
from typing import List, Optional, Tuple, Union

import discord
Expand Down Expand Up @@ -54,7 +55,7 @@ class LinkQuoter(commands.Cog):
Quote Discord message links.
"""

__version__ = "1.2.0"
__version__ = "1.2.1"

def format_help_for_context(self, ctx):
pre_processed = super().format_help_for_context(ctx)
Expand Down Expand Up @@ -130,11 +131,11 @@ async def message_to_embed(
image = None
e: discord.Embed = None
if message.embeds:
embed = message.embeds[0].copy()
embed = message.embeds[0]
if str(embed.type) == "rich":
if footer_field:
embed.timestamp = message.created_at
e = embed
e = discord.Embed.from_dict(deepcopy(embed.to_dict()))
if str(embed.type) in ("image", "article"):
image = embed.url

Expand Down

0 comments on commit 2c901c0

Please sign in to comment.