'Date: ' + new Date().toDateString() + '\n' }; var options = { method: 'post',…
- User
'Date: ' + new Date().toDateString() + '\n' };
var options = { method: 'post', contentType: 'application/json', payload: JSON.stringify(payload) };
UrlFetchApp.fetch(discordWebhookUrl, options); }
function saveToGoogleSheet(formData) { var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// Append form data to the Google Sheet sheet.appendRow([new Date().toDateString(), formData.code]); }
Update this to send the time instead of date
- Assistant
function sendToDiscord(formData) { var discordWebhookUrl = 'YOUR_DISCORD_WEBHOOK_URL';
var payload = { content: 'Time: ' + new Date().toTimeString() + '\n' };
var options = { method: 'post', contentType: 'application/json', payload: JSON.stringify(payload) };
UrlFetchApp.fetch(discordWebhookUrl, options); }
function saveToGoogleSheet(formData) { var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// Append form data to the Google Sheet sheet.appendRow([new Date().toTimeString(), formData.code]); }