Hi guys,
I saw a streamer who has a count of matches for tournaments For example when someone types !match it comes up with Match 3/6 solo cash cup :FortOne :FortOne . And if a mod types !m Match 4/6 solo cash cup it update !match to say Match 4/6 solo cash cup :FortOne :FortOne . But when i tried to replicate this !m kept on coming back that the response must be less than 400 characters.
I am trying to do this via google sheets and a script. This is the script for the google sheets:
function storeData(key, value) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var lastRow = sheet.getLastRow() + 1;
sheet.getRange(lastRow, 1).setValue(key);
sheet.getRange(lastRow, 2).setValue(value);
return "Data stored successfully for key: " + key;
}
function getData(key) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = sheet.getDataRange().getValues();
for (var i = 1; i < data.length; i++) {
if (data[i][0] === key) {
return "Value for " + key + ": " + data[i][1];
}
}
return "Key not found: " + key;
}
The command I entered in to nb for !m which is the storeData function is
$(urlfetch script for google https adresss cant add link/macros/s/AKfycbzgp7WGxYP_cP4JZpAK3l5EgLM62ic7WQPw7PJyHR_SgoA4ax5rHoEKml4UaG9R-0DH1Q/exec?command=storeData&key=$(querystring $(1))&value=$(querystring $(2)))
And for the !match which is the getData function is
$(urlfetch script for google https adresss cant add link/macros/s/AKfycbwlnGVixgMxpJ_ZoJoPbE8NKfjOVb-wozAA75w5l9rTQn5xya5nfGtgvObCYWnpSNdcmA/exec?command=getData&key=$(querystring $(1)))
I hope someone can help me,
Thank you

