| 455 | async function listGalleryCommand(args) { | 455 | async function listGalleryCommand(args) { |
| 456 | try { | 456 | try { |
| 457 | let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid); | 457 | let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid); |
| 458 | if (!args.char && !args.group && !selected_group && this_chid) { | 458 | if (!args.char && !args.group && !selected_group && this_chid !== undefined) { |
| 459 | const char = characters[this_chid]; | 459 | const char = characters[this_chid]; |
| 460 | url = char.avatar.replace('.png', ''); | 460 | url = char.avatar.replace('.png', ''); |
| 461 | } | 461 | } |