Hello, I am trying to create a crate drop game in my chat. I have never done any of this before, but I wrote this code using a few different ideas from here:
My first attempt returned in my twitch chat "Unexpected template string" because I think it was too long what was inside the brackets,
!addcom !cratedrop $(user) reached the crate drop first! $(eval a=[AWM, M24, Mk14, Groza, 6x Scope, 8x Scope, 15x Scope, DMR/SR Suppressor, AUG, P90, AR Suppressor, Ghillie Suit, Lvl 3 Spetznas Helmet, Lvl 3 Military Vest, Lvl 3 Backpack. Adrenaline Syringe, MedKit,];a[Math.floor(Math.random()*a.length)]) was looted!
ModeratorVerifiedNightbot: @Crisp Sloth -> The command "!cratedrop" has been added successfully.
BroadcasterPrime Gamingoregonmomegon: !cratedrop
ModeratorVerifiedNightbot: oregonmomegon reached the crate drop first! Unexpected template string was looted!
then I tried using $urlfet pastebin and it returned "Code generation from strings disallowed for this context "
!addcom !cratedrop $(user) reached the cratedrop first and found loot! $(eval $(urlfetch json https://pastebin.com/Apm4GTxQ)) were looted!
ModeratorVerifiedNightbot: @Crisp Sloth -> The command "!cratedrop" has been added successfully.
BroadcasterPrime Gamingoregonmomegon: !cratedrop
ModeratorVerifiedNightbot: oregonmomegon reached the cratedrop first and found loot! Code generation from strings disallowed for this context were looted!
So after more reading, I got a bit confused if Pastebin will work for returning long strings of individual items, so I tried pastebin and it returned "Code generation from strings disallowed for this context"