#(doxaaaa) quick question ( checking if context args return empty or null? )
15 messages · Page 1 of 1 (latest)
(doxaaaa) quick question ( checking if context args return empty or null? )
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!t is_empty
!t list.is_empty
Returns whether the list is empty.
ElementTag(Boolean)
- if <list[something].is_empty>:
- narrate "never shows"
- else:
- narrate "it ain't empty!"
- if <list.is_empty>:
- narrate "it empty!"
!t list.any
Returns whether the list is not empty.
ElementTag(Boolean)
- if <list.any>:
- narrate "never shows"
- else:
- narrate "ain't got any"
- if <list[something].any>:
- narrate "something's here!"
any of these work. they're just the inverse boolean of each other
Do note that these are ListTag tags, I.e. you'll want to use them on context.args (which is a list) and not on raw_args
Feel free to ask if you need any more help, otherwise -
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@cold flume
the list null helps because normal is_empty didnt work
cheers