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

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

问题描述

我尝试:

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

但是每次都不会返回

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

解决方案

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

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.

解决方案

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天全站免登陆