Discord bot giving error, db.keys()

I copied each line from the one hour tutorial.
It is giving me following error.

File “main.py”, line 15, in
if “responding” not in db.keys():
AttributeError: ‘NoneType’ object has no attribute ‘keys’

please share the link to the tutorial and your code

Link to code–> Jul 13 4:50 PM - Codeshare
Link to video–> ‘Code a Discord Bot with Python - Host for Free in the Cloud - YouTube

I ran this in my local…do i need to make some other changes for that

have you set up a database on your local environment?
this will not work on local, so you don’t have a database to use from the bot

from replit import db

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.