問題描述
如果用戶有,我試圖讓它顯示是",我正在與有硝基的用戶進行測試,但一直顯示否"
I'm trying to make it show 'yes' if the user has, I'm testing with a user who has nitro, but keeps showing 'no'
.addField('Nitro', `${member.premiumSubscriptionCount ? 'Yes' : 'No'}`,true)
推薦答案
IIRC,如果用戶擁有帶有機器人的 Nitro,則無法獲取,但是您使用 OAuth 可以獲取用戶信息
IIRC, you cannot get if the user has Nitro with a bot, however you make a user authorize using your OAuth which you can get the user's info
如果 用戶也可以獲得a> 有一個帶有 User.displayAvatarURL({dynamic:true}).endsWith('.gif')
的動畫頭像(只有 Nitro 或 Nitro 經典用戶可以使用動畫頭像)
You can also get if the User has an animated avatar with User.displayAvatarURL({dynamic:true}).endsWith('.gif')
(only Nitro or Nitro classic users can use animated avatars)
您還可以獲得用戶.flags 但它不包括他們是否有 Nitro.
You can also get User.flags but it doesn't include if they have Nitro or not.
這篇關于顯示該成員是否有 nitro discord的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!