first of all, I’m not good at english…
I wanted to make a command that show certain discord voice channel users’ nicknames.
It wasn’t hard. I use a code from https://gist.github.com/Aaron128l/ce59040013ba3a90af63e49b802075e8
$(eval var members = $(urlfetch json https://canary.discordapp.com/api/guilds/(channel id)/widget.json).members.filter(x => x.channel_id === ‘(voice channel id)’).map(x => x.username); ${members}
)
but I had a problem. If no one in this voice channel, this command shows [Error Connecting To WebEval Service]
I want to make this command to show a message when no one is in the channel; ‘Playing games alone’
I don’t know programming well. I tried a lot of method, but I couldn’t find solutions…
I think the problem is ‘filter’, however I don’t know how to replace it. I was failed to use if, try-catch, etc.
plz help me…