Skip to content

feat: app emojis #2501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
dc9fec5
add routes
NeloBlivion Jul 18, 2024
847cc4f
unfinished methods, needs rework
NeloBlivion Jul 18, 2024
b8c8dd2
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 19, 2024
607bc10
new classes
NeloBlivion Jul 19, 2024
f7a8f11
Merge branch 'master' into app_emojis
NeloBlivion Jul 19, 2024
833695d
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 19, 2024
79497e7
refinements
NeloBlivion Jul 19, 2024
6e5338e
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 19, 2024
90c4b55
Merge branch 'master' into app_emojis
NeloBlivion Jul 23, 2024
0aa1f8e
fix kwargs
NeloBlivion Jul 23, 2024
e9fae0f
_state -> _connection
NeloBlivion Jul 23, 2024
f2e81c7
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 23, 2024
3f04a98
cache on ready
NeloBlivion Jul 23, 2024
1244e4f
full cache
NeloBlivion Jul 23, 2024
5d389f9
remove delete reason
NeloBlivion Jul 23, 2024
42d3887
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 23, 2024
744a45f
Merge branch 'master' into app_emojis
Lulalaby Aug 16, 2024
82a5591
Merge branch 'master' into app_emojis
plun1331 Aug 28, 2024
70d23ba
Merge branch 'master' into app_emojis
NeloBlivion Sep 9, 2024
7b46217
adjust slots
NeloBlivion Sep 10, 2024
d14413f
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 10, 2024
c01e384
Update discord/emoji.py
plun1331 Sep 10, 2024
0381a6e
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 10, 2024
4ccf9b1
update all references to the Emoji class
NeloBlivion Sep 10, 2024
1bf8195
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 10, 2024
f2f0848
Merge branch 'master' into app_emojis
NeloBlivion Sep 10, 2024
b937eaa
misc
NeloBlivion Sep 10, 2024
9b018eb
cl
NeloBlivion Sep 10, 2024
ba5ffaf
Merge branch 'master' into app_emojis
NeloBlivion Oct 4, 2024
6f97d3a
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 4, 2024
d8f7ee4
add deprecation
NeloBlivion Oct 4, 2024
5935ef9
Merge branch 'master' into app_emojis
plun1331 Oct 4, 2024
73d9336
Merge branch 'master' into app_emojis
plun1331 Oct 4, 2024
b27903a
Merge branch 'master' into app_emojis
NeloBlivion Oct 14, 2024
7872075
Merge branch 'master' into app_emojis
NeloBlivion Oct 17, 2024
2930699
Merge branch 'master' into app_emojis
NeloBlivion Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style(pre-commit): auto fixes from pre-commit.com hooks
  • Loading branch information
pre-commit-ci[bot] committed Jul 19, 2024
commit 6e5338e2b1f35d08b3b8113df1cec6a1755fbe1b
2 changes: 1 addition & 1 deletion discord/emoji.py
Original file line number Diff line number Diff line change
@@ -414,4 +414,4 @@ async def edit(
data = await self._state.http.edit_application_emoji(
self.application_id, self.id, payload=payload
)
return self._state.maybe_store_app_emoji(self.application_id, data)
return self._state.maybe_store_app_emoji(self.application_id, data)
8 changes: 4 additions & 4 deletions discord/state.py
Original file line number Diff line number Diff line change
@@ -382,11 +382,11 @@ def store_emoji(self, guild: Guild, data: EmojiPayload) -> GuildEmoji:
self._emojis[emoji_id] = emoji = GuildEmoji(guild=guild, state=self, data=data)
return emoji

def maybe_store_app_emoji(self, application_id: int, data: EmojiPayload) -> AppEmoji:
def maybe_store_app_emoji(
self, application_id: int, data: EmojiPayload
) -> AppEmoji:
# the id will be present here
emoji = AppEmoji(
application_id=application_id, state=self, data=data
)
emoji = AppEmoji(application_id=application_id, state=self, data=data)
if self.cache_app_emojis:
emoji_id = int(data["id"]) # type: ignore
self._emojis[emoji_id] = emoji