Hello, so first and foremost, I am a noob when it comes to this stuff. I'm brand-spankin' new to the world of chatbots and whatnot -- so go easy on me when providing solutions. I've enlisted the help of ChatGPI to figure out how to resolve the issue. So, I'm using Google Sheets as the link or holder of the quotes (I don't know how to phrase it). I followed ChatGPI's instructions...
The instructions were:
1. Create your spreadsheet
2. In column A, place the quote, in B, insert info about the quote-giver
3. Go to "Extensions" -> "Apps Script"
4. Replace existing code with:
function getRandomQuote() {var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();var lastRow = sheet.getLastRow();var randomRow = Math.floor(Math.random() * lastRow) + 1;var quote = sheet.getRange(randomRow, 1).getValue();var author = sheet.getRange(randomRow, 2).getValue();return "Quote: " + quote + " - Author: " + author;}
5. Save, deploy, authorize, etc.
So far, so good. I get to the part where I need to input the code into Nightbot. I'm a little confused by what Nightbot wants me to do. But from what I've gathered, the "!addquote" command is specifically for mods.
!addcom -ul=mod !addquote add $(urlfetch https://script.google.com/macros/s/YOUR_SCRIPT_ID/exec?quote=$(querystring))
I did that, but I kept getting the "-ul=mod !addquote [Response must be less than 400 characters]" error. ChatGPT told me to input this code for viewers under the "!quote" command.
!addcom !quote $(urlfetch https://script.google.com/macros/s/YOUR_SCRIPT_ID/exec)
I got the "[Response must be less than 400 characters]" error.
ChatGPT provided these solutions to fix the error:
For the "!addquote" command only used by moderators: