PuzzleTechHub / bot-be-named

MIT License
6 stars 5 forks source link

New command : ~copyscripts #18

Open TheOriginalSoni opened 3 years ago

TheOriginalSoni commented 3 years ago

~copyscripts Sheet1 Sheet2

Function to copy all GSheets scripts from template to another sheet

kevslinger commented 3 years ago

This would be very cool. I still don't know how to do it. AFAIK, gspread only works with the actual values in the sheets themselves, not the scripts behind them. Perhaps another library does that can work with this? I don't want to make actual HTTP requests to google drive myself

TheOriginalSoni commented 2 years ago

Doable, but only with a user account, according to the discussion at Puzzle World discord server

https://developers.google.com/apps-script/api/reference/rest/v1/projects/create

https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent

TheOriginalSoni commented 2 years ago

Do we need to make a new user account to add to the bot?