0

I recently found a very interesting bot that I want to expand on. It's a bot that writes input from users to a spreadsheet. What I would like to do is to be able to write on specific sheets inside of a main spreadsheet, and the option to read data from the spreadsheet and post it as a message on the server. So this is the part of the code relevant to what I'm asking:

        SPREADSHEET_ID = 'Add ID here' 
        RANGE_NAME = 'A2'
        FIELDS = 3

        msg = message.content[3:]
        result = [x.strip() for x in msg.split(',')]

if len(result) == FIELDS:
print(message.created_at)
            DATA = [message.author.name] + [str(message.author.id)] + [str(message.created_at)] + result
            sheet.add(SPREADSHEET_ID, RANGE_NAME, DATA)
await message.channel.send('Thank you! Your bet has been placed :)')

so I would want to have the 2nd entry to the message (which is result[1]) to be the sheet name that it will input the data in. Can anyone help me with this? Thank you!

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Xepher Io
  • 3
  • 2

0 Answers0