【问题标题】:Enlarge default emojis discord.py放大默认表情符号 discord.py
【发布时间】:2021-09-05 23:18:20
【问题描述】:

有没有办法使用 discord.py 发送放大的默认表情符号?

我找到了一种使用自定义表情符号而不是默认表情符号的方法。

【问题讨论】:

标签: discord.py


【解决方案1】:

您一定看过我的 previous answer 自定义表情符号,我对其进行了编辑以包含默认表情符号。

这是一个带有默认表情符号的编辑版本。 UNICODE_EMOJI 是 Python 内置的一组表情符号,您可以在其中签入以验证输入的字符串是否是有效的表情符号。

# from typing import Union
# from emoji import UNICODE_EMOJI

@bot.command()
async def big(ctx, emoji: Union[discord.Emoji, str] = None):
    # custom emoji
    if isinstance(emoji, discord.Emoji):
        await ctx.send(emoji.url)
    # default emoji
    elif isinstance(emoji, str) and emoji in UNICODE_EMOJI:
        await ctx.send(emoji)
    else:
        await ctx.send("Not a valid emoji")

【讨论】:

    【解决方案2】:

    我不确定我是否理解你的问题,但如果我理解了,你可以这样做:

    await message.channel.send("?")#for this emojie just press windows+dot
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-22
      • 1970-01-01
      • 2020-12-30
      • 2020-12-16
      • 2020-07-15
      • 1970-01-01
      • 2020-07-31
      • 2021-08-09
      相关资源
      最近更新 更多