3

i try:

discord.utils.get(client.get_all_emojis(), id=469334117020991508)

but this return none every time

I would like to get the url custom emoji from chat text.

  • 1
    If you're using discord.py 0.16, then all ids are strings. Try `discord.utils.get(client.get_all_emojis(), id="469334117020991508")` – Patrick Haugh Jul 23 '18 at 15:38

1 Answers1

1

Your code should work - you're using get_all_emojis() correctly. The most likely reason that it is returning None is that there is no emoji with that id. Try something like print(list(client.get_all_emojis())) and see if there is actually an entry with that id.

lmq_305
  • 65
  • 6