Skip to content

Commit

Permalink
Merge pull request #12 from UnifierHQ/dev
Browse files Browse the repository at this point in the history
1.4.1: File bridging fix
  • Loading branch information
greeeen-dev authored Feb 13, 2025
2 parents 23b3d37 + 782719a commit 6b77440
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
6 changes: 3 additions & 3 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"id": "revolt",
"name": "Revolt Support",
"description": "Unifier Revolt Support extension",
"version": "v1.4.0",
"release": 42,
"version": "v1.4.1",
"release": 43,
"minimum": 58,
"services": [
"bridge_platform"
],
"bridge_platform": "revolt",
"shutdown": true,
"requirements": [
"https://github.com/revoltchat/revolt.py/archive/refs/heads/master.zip",
"https://github.com/greeeen-dev/revolt.py/archive/refs/heads/master.zip",
"ulid-py",
"typing-extensions",
"aenum"
Expand Down
28 changes: 18 additions & 10 deletions revolt_bridge_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,6 @@ def convert_embeds_discord(self, embeds):
)
embed.set_thumbnail(url=embeds[i].icon_url)

if embeds[i].footer:
embed.set_footer(text=embeds[i].footer)

converted.append(embed)
return converted

Expand Down Expand Up @@ -435,13 +432,24 @@ def to_color(color):
newlines.append(line)
content = '\n'.join(newlines)

msg = await channel.send(
content,
embeds=special['embeds'] if 'embeds' in special.keys() else None,
attachments=special['files'] if 'files' in special.keys() else None,
reply=revolt.MessageReply(reply_msg) if reply_id else None,
masquerade=persona
)
try:
msg = await channel.send(
content,
embeds=special['embeds'] if 'embeds' in special.keys() else None,
attachments=special['files'] if 'files' in special.keys() else None,
reply=revolt.MessageReply(reply_msg) if reply_id else None,
masquerade=persona
)
except Exception as e:
if str(e) == 'Expected object or value':
msg = await channel.send(
content,
embeds=special['embeds'] if 'embeds' in special.keys() else None,
reply=revolt.MessageReply(reply_msg) if reply_id else None,
masquerade=persona
)
else:
raise
return msg

async def edit(self, message, content, special: dict = None):
Expand Down

0 comments on commit 6b77440

Please sign in to comment.