diff --git a/interactions/api/models/channel.py b/interactions/api/models/channel.py index 53dae9a50..9546aef9d 100644 --- a/interactions/api/models/channel.py +++ b/interactions/api/models/channel.py @@ -337,7 +337,12 @@ async def modify( reason=reason, data=payload._json, ) - return Channel(**res, _client=self._client) + ch = Channel(**res, _client=self._client) + + for attr in self.__slots__: + setattr(self, attr, getattr(ch, attr)) + + return ch async def set_name( self, diff --git a/interactions/api/models/guild.py b/interactions/api/models/guild.py index d1d5b2d82..11a375357 100644 --- a/interactions/api/models/guild.py +++ b/interactions/api/models/guild.py @@ -1040,7 +1040,12 @@ async def modify( payload=payload, reason=reason, ) - return Guild(**res, _client=self._client) + guild = Guild(**res, _client=self._client) + + for attr in self.__slots__: + setattr(self, attr, getattr(guild, attr)) + + return guild async def set_name( self, @@ -1498,7 +1503,7 @@ async def get_emoji( res = await self._client.get_guild_emoji(guild_id=int(self.id), emoji_id=emoji_id) return Emoji(**res, _client=self._client) - async def get_all_emojis(self) -> List[Emoji]: + async def get_all_emoji(self) -> List[Emoji]: """ Gets all emojis of a guild. diff --git a/interactions/api/models/member.py b/interactions/api/models/member.py index d03054b6a..c8357877a 100644 --- a/interactions/api/models/member.py +++ b/interactions/api/models/member.py @@ -343,7 +343,12 @@ async def modify( payload=payload, reason=reason, ) - return Member(**res, _client=self._client) + member = Member(**res, _client=self._client) + + for attr in self.__slots__: + setattr(self, attr, getattr(member, attr)) + + return member async def add_to_thread( self, diff --git a/interactions/api/models/message.py b/interactions/api/models/message.py index 529e6bb32..80a382560 100644 --- a/interactions/api/models/message.py +++ b/interactions/api/models/message.py @@ -415,7 +415,12 @@ async def edit( payload=payload._json, ) - return Message(**_dct) if not _dct.get("code") else payload + msg = Message(**_dct) if not _dct.get("code") else payload + + for attr in self.__slots__: + setattr(self, attr, getattr(msg, attr)) + + return msg async def reply( self, diff --git a/interactions/api/models/role.py b/interactions/api/models/role.py index f34d1ba51..6a8ac3a3c 100644 --- a/interactions/api/models/role.py +++ b/interactions/api/models/role.py @@ -137,7 +137,12 @@ async def modify( data=payload._json, reason=reason, ) - return Role(**res, _client=self._client) + role = Role(**res, _client=self._client) + + for attr in self.__slots__: + setattr(self, attr, getattr(role, attr)) + + return role async def modify_position( self,