如何使用 client.get_all_emojis() discord.py [英] how to use client.get_all_emojis() discord.py

查看:14
本文介绍了如何使用 client.get_all_emojis() discord.py的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试试:

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

但这每次都不返回

我想从聊天文本中获取 url 自定义表情符号.

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

推荐答案

你的代码应该工作 - 你正确地使用了 get_all_emojis().它返回 None 的最可能原因是没有具有该 ID 的表情符号.尝试类似 print(list(client.get_all_emojis())) 的方法,看看是否确实存在具有该 ID 的条目.

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.

这篇关于如何使用 client.get_all_emojis() discord.py的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆