diff --git a/src/cogs/booru.py b/src/cogs/booru.py index bf96b1a..e72c203 100644 --- a/src/cogs/booru.py +++ b/src/cogs/booru.py @@ -833,7 +833,9 @@ class MsG: icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['file_url']) - await number.delete() + if ctx.channel is d.TextChannel: + with suppress(errext.CheckFailure): + await number.delete() await paginator.edit(content='\N{HEAVY BLACK HEART}' if keys[c - 1] in hearted.keys() else None, embed=embed) @@ -973,7 +975,9 @@ class MsG: icon_url=self._get_score(values[c - 1]['score'])) embed.set_image(url=values[c - 1]['file_url']) - await number.delete() + if ctx.channel is d.TextChannel: + with suppress(errext.CheckFailure): + await number.delete() await paginator.edit(content='\N{HEAVY BLACK HEART}' if keys[c - 1] in hearted.keys() else None, embed=embed)