DisnakeDev / disnake

An API wrapper for Discord written in Python.
https://docs.disnake.dev
MIT License
719 stars 137 forks source link

Making None have same effect as EmptyEmbed #916

Closed leothewolf closed 1 year ago

leothewolf commented 1 year ago

Summary

Make None have same effect as EmptyEmbed

What is the feature request for?

The core library

The Problem

So I noticed in warnings that you guys are removing EmptyEmbed. Well I replaced it with None as asked in warning but my bot is now printing None as text in title which wouldn't be the case if I would be using EmptyEmbed it would have just been empty title but now am getting it printing None.

The Ideal Solution

Make None have same effect as EmptyEmbed if you are replacing something with another!

The Current Solution

Well Ill have to roll back my code to EmptyEmbed as library still supports it or Ill have to perform checks if title is empty and same goes for each stuff within embed like description , title , icon_url (in author and footer) , etc. So that makes the code bigger and not efficient.

Additional Context

I hope this is addressed soon as you are already printing the warning and the new thing suggested is not having same effect as previous one so people may update and face the same issue and then have to again shift back to code before! Thus , leading to wastage of time.

leothewolf commented 1 year ago

So the above issue is not an issue for all use cases but was for what I was dealing. My code :

@bot.command()
async def test(ctx):
    embed = disnake.Embed(title=None,description="no")
    embed.set_footer(text=None)

    await ctx.send(embed=embed)

image_2023-01-16_192543695

So if None is passed in footer text and title and description is defined then the above error occurs!

leothewolf commented 1 year ago

Has been resolved! I had an older version of disnake running and as per new library footer text is now a string and doesn't have EmptyEmbed so its only better to set footer when str is not empty!