首页 > 解决方案 > 当我的不和谐机器人引用 reddit 时,如何不显示这个无用的小部件

问题描述

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

这里是

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

这是我的代码:

    @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')

标签: pythondiscordbots

解决方案


把链接包进去< >

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

这是 Discord 的一项功能,不仅限于编写机器人。


推荐阅读