fix(tl): improved bot-only methods detection
This commit is contained in:
parent
97ba7652ff
commit
f45b602423
1 changed files with 4 additions and 1 deletions
|
@ -406,7 +406,10 @@ async function addDocumentation(obj) {
|
|||
let botsCanUse = !!$("h3:contains('Bots can use this method')")
|
||||
.length
|
||||
let onlyBotsCanUse =
|
||||
botsCanUse && !!target.description.match(/; for bots only$/)
|
||||
botsCanUse && (
|
||||
!!target.description.match(/[,;]( for)? bots only$/)
|
||||
|| target.throws.some((it) => it.code === 'USER_BOT_REQUIRED')
|
||||
)
|
||||
|
||||
target.available = onlyBotsCanUse
|
||||
? 'bot'
|
||||
|
|
Loading…
Reference in a new issue