mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Refactor name
kwarg for Emoji.edit()
This commit is contained in:
parent
bf3e0a94b8
commit
f273199d57
@ -281,7 +281,7 @@ class Emoji:
|
||||
|
||||
await self._state.http.delete_custom_emoji(self.guild.id, self.id, reason=reason)
|
||||
|
||||
async def edit(self, *, name, roles=None, reason=None):
|
||||
async def edit(self, *, name=None, roles=None, reason=None):
|
||||
r"""|coro|
|
||||
|
||||
Edits the custom emoji.
|
||||
@ -306,6 +306,7 @@ class Emoji:
|
||||
An error occurred editing the emoji.
|
||||
"""
|
||||
|
||||
name = name or self.name
|
||||
if roles:
|
||||
roles = [role.id for role in roles]
|
||||
await self._state.http.edit_custom_emoji(self.guild.id, self.id, name=name, roles=roles, reason=reason)
|
||||
|
Loading…
x
Reference in New Issue
Block a user