forgot 'or null'
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s

This commit is contained in:
Nexus 2024-05-05 03:02:55 +01:00
parent 55cec92705
commit 0e48d752d5
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -212,7 +212,7 @@ class Starboard(commands.Cog):
@commands.message_command(name="Preview Starboard Message")
async def preview_starboard_message(self, ctx: discord.ApplicationContext, message: discord.Message):
embed, stars = await self.generate_starboard_embed(message)
data = await self.redis.get(str(message.id))
data = await self.redis.get(str(message.id)) or 'null'
return await ctx.respond(
f"```json\n{json.dumps(json.loads(data), indent=4)}\n```\nStars: {stars:,}",
embeds=embed