简体   繁体   English

在我的 userinfo 命令中,我应该怎么做,我不必使用此人的 ID 并 ping 他们。 它将显示使用 cmd 的人的信息

[英]In my userinfo command how should i do that I don’t have to use the ID of the person and ping them. It will show the info of the person using the cmd

I want to make it so when i execute the command without pinging or using the ID of the person it will show the userinfo of the person using the command.我想这样做,所以当我在不 ping 或使用人的 ID 的情况下执行命令时,它将显示使用该命令的人的用户信息。

You will have to check if message.mentions.members.first() is null.您必须检查message.mentions.members.first()是否为 null。 If so then use the message's author - message.author .如果是这样,那么使用消息的作者 - message.author

But it's hard to help and give suggestions without showing us what you have made so far.但是,如果不向我们展示您迄今为止所做的工作,就很难提供帮助和建议。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何允许一个人使用具有权力的命令? - How do i allow one person to use a command with powers? 我正在发出抢劫命令,但我不知道如何让它在失败时激活超时或从人身上减去硬币 - I'm making a rob command and I don't know how to make it activate the timeout when it fails or subtract the coins from the person 如何仅使用用户 ID 提及使用 Discord.js 的人? - How do I mention a person using Discord.js with only the user id? 如果一个人在移动设备上,如何使用php或JavaScript将他们重定向到我的移动网站? - How do I use php or JavaScript to make a person be redirected to my mobile site if they are on a mobile? 如果此人不符合条件,我如何使我的JavaScript提示重定向到其他页面 - How do I make my JavaScript prompt redirect to a different page if the person doesn't qualify 如何在我的网站上添加一个元标记,以便在我的iPhone Web视图中,当该人持有链接时不会显示弹出窗口? - How do I add a meta tag to my website so that in my iPhone web view, the pop up doesn't show when the person holds a link? 我想生成直到 3 的随机数,但我不想重复它们。 我怎样才能让它工作? - I want to generate random numbers till 3 but i don't want to repeat them. How can i make it work? 如何使消息收集器仅由执行命令的人运行? - How do I make the message collector only be run by the person who executed the command? 将“和另一个这样的人”添加到我的网站后,如何更改其颜色? - How do I change the colour of 'and one other person like this' when I've added it to my site? 我应该如何计算一个人是否在使用地理位置的商店50米范围内? - How should I calculate if a person is within 50 meters range of a store using geolocation?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM