I have a Union list of discord.PartialEmoji and discord.Sticker and i iterate them into CDN asset to preview like this
<code>
if isinstance(emoji, discord.PartialEmoji):
self.url = emoji.url
else:
self.url = f"https://cdn.discordapp.com/stickers/{emoji.id}.png"
</code>
<code>
if isinstance(emoji, discord.PartialEmoji):
self.url = emoji.url
else:
self.url = f"https://cdn.discordapp.com/stickers/{emoji.id}.png"
</code>
if isinstance(emoji, discord.PartialEmoji):
self.url = emoji.url
else:
self.url = f"https://cdn.discordapp.com/stickers/{emoji.id}.png"
And now i want to upload these as a sticker in guild it could be either using object or CDN link
I’ve already tried this with emojis
Code:
<code>
emoji = data[index]
name = emoji.name.replace(" ", "_") # i have to replace whitespace when it's a sticker
emoji = await ctx.guild.create_custom_emoji(name=name, image=await emoji.read())
</code>
<code>
emoji = data[index]
name = emoji.name.replace(" ", "_") # i have to replace whitespace when it's a sticker
emoji = await ctx.guild.create_custom_emoji(name=name, image=await emoji.read())
</code>
emoji = data[index]
name = emoji.name.replace(" ", "_") # i have to replace whitespace when it's a sticker
emoji = await ctx.guild.create_custom_emoji(name=name, image=await emoji.read())
And there’s a slight issue with that whenever i upload animated sticker in this it gets uploaded as a static