From 69e34a5bae5f0efac4fecb63957f65f135a8c0dd Mon Sep 17 00:00:00 2001 From: NPOS <109908989+npostring@users.noreply.github.com> Date: Wed, 23 Nov 2022 16:11:35 +0000 Subject: [PATCH 1/3] =?UTF-8?q?Discord.py=202.0=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dispander/module.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dispander/module.py b/dispander/module.py index cff396a..64233cd 100644 --- a/dispander/module.py +++ b/dispander/module.py @@ -3,7 +3,6 @@ import discord from discord import Embed -from discord.embeds import EmptyEmbed from discord.ext import commands import re @@ -105,8 +104,8 @@ async def dispand(message): await main_message.add_reaction(DELETE_REACTION_EMOJI) main_embed = main_message.embeds[0] main_embed.set_author( - name=getattr(main_embed.author, "name", EmptyEmbed), - icon_url=getattr(main_embed.author, "icon_url", EmptyEmbed), + name=getattr(main_embed.author, "name", None), + icon_url=getattr(main_embed.author, "icon_url", None), url=make_jump_url(message, m, sent_messages) ) await main_message.edit(embed=main_embed) @@ -172,12 +171,12 @@ def compose_embed(message): ) embed.set_author( name=message.author.display_name, - icon_url=message.author.avatar_url, + icon_url=message.author.avatar, url=message.jump_url ) embed.set_footer( text=message.channel.name, - icon_url=message.guild.icon_url, + icon_url=message.guild.icon, ) if message.attachments and message.attachments[0].proxy_url: embed.set_image( From 13feb09b76b3bed5fef819ab597a28931f016437 Mon Sep 17 00:00:00 2001 From: NPOS Date: Sat, 26 Nov 2022 12:53:55 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fallback=E7=94=A8=E3=81=AE=E7=94=BB?= =?UTF-8?q?=E5=83=8FURL=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dispander/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dispander/module.py b/dispander/module.py index 64233cd..14cee7b 100644 --- a/dispander/module.py +++ b/dispander/module.py @@ -171,12 +171,12 @@ def compose_embed(message): ) embed.set_author( name=message.author.display_name, - icon_url=message.author.avatar, + icon_url=message.author.avatar if message.author.avatar is not None else f'{discord.Asset.BASE}/embed/avatars/{discord.DefaultAvatar.red}.png', url=message.jump_url ) embed.set_footer( text=message.channel.name, - icon_url=message.guild.icon, + icon_url=message.guild.icon if message.guild.icon is not None else f'{discord.Asset.BASE}/embed/avatars/{discord.DefaultAvatar.red}.png', ) if message.attachments and message.attachments[0].proxy_url: embed.set_image( From ac684d30d51087cb5c1302471670f4a75b94b875 Mon Sep 17 00:00:00 2001 From: NPOS Date: Sat, 26 Nov 2022 14:51:40 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=89=E9=A0=85=E6=BC=94=E7=AE=97?= =?UTF-8?q?=E5=AD=90=E3=82=92or=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dispander/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dispander/module.py b/dispander/module.py index 14cee7b..3370f60 100644 --- a/dispander/module.py +++ b/dispander/module.py @@ -171,12 +171,12 @@ def compose_embed(message): ) embed.set_author( name=message.author.display_name, - icon_url=message.author.avatar if message.author.avatar is not None else f'{discord.Asset.BASE}/embed/avatars/{discord.DefaultAvatar.red}.png', + icon_url=message.author.avatar or f'{discord.Asset.BASE}/embed/avatars/{discord.DefaultAvatar.red}.png', url=message.jump_url ) embed.set_footer( text=message.channel.name, - icon_url=message.guild.icon if message.guild.icon is not None else f'{discord.Asset.BASE}/embed/avatars/{discord.DefaultAvatar.red}.png', + icon_url=message.guild.icon or f'{discord.Asset.BASE}/embed/avatars/{discord.DefaultAvatar.red}.png', ) if message.attachments and message.attachments[0].proxy_url: embed.set_image(