当我的discord机器人引用reddit时,如何不显示这个无用的小部件

2024-04-26 23:01:17 发布

您现在位置:Python中文网/ 问答频道 /正文

当我的discord机器人指向reddit时,如何不显示这个无用的小部件:

here it is

是否可以使这个小部件不显示

这是我的密码:

    @client.command()
async def reddit(ctx, arg, arg2 = None):
    if not arg2:
        await ctx.send('https://www.reddit.com/search/?q=' + str(arg))
        await ctx.send('`^ Searching for` ' + str(arg) + '`... ^`')
    if arg2:
        await ctx.send('https://www.reddit.com/' + str(arg2) + '/search?q=' + str(arg) + '&restrict_sr=1')

1条回答
网友
1楼 · 发布于 2024-04-26 23:01:17

将链接包装在< >

await ctx.send('<https://www.reddit.com/search/?q=' + str(arg) + ">")

这是一个不和谐的特性,不仅仅是针对编写机器人的

相关问题 更多 >