#(doxaaaa) quick question ( checking if context args return empty or null? )

15 messages · Page 1 of 1 (latest)

cold flume
#

Just want to see if theres a better way to check if a command returns no context args ( Im assuming to use null but i cant figure it out )
- if <context.raw_args> == "":

chrome glenBOT
#

(doxaaaa) quick question ( checking if context args return empty or null? )

chrome glenBOT
#

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.

tame lantern
#

!t is_empty

hybrid irisBOT
# tame lantern !t is_empty
Cannot Specify Searched Tag

Multiple possible tags: <EntityTag.is_empty>, <InventoryTag.is_empty>, <ListTag.is_empty>, <MapTag.is_empty>.

tame lantern
#

!t list.is_empty

hybrid irisBOT
tame lantern
#

!t list.any

hybrid irisBOT
# tame lantern !t list.any

Returns whether the list is not empty.

Returns

ElementTag(Boolean)

Examples
- if <list.any>:
    - narrate "never shows"
- else:
    - narrate "ain't got any"
- if <list[something].any>:
    - narrate "something's here!"
tame lantern
#

any of these work. they're just the inverse boolean of each other

ebon aurora
#

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 -

real daggerBOT
#
Thread Closing Reminder

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

cold flume