Command raised an exception: TypeError: string indices must be integers
я пытаюсь сделать онду команду 2 с половиной дня. пожалуйста, помогите. я хочу чтобы если пользователь уже находился в файлике - писало, что он уже в папке. код:
@bot.command()
async def getstart(ctx):
await ctx.send('placeholder (welcome message here)')
with open("config.json") as feedsjson:
feeds = json.load(feedsjson)
if not ctx.author.id in list(filter(lambda x: x['name'] == ctx.author.id, feeds)):
await ctx.send('placeholder (we can add user in json file)..')
getstartinsocialcredit(ctx.message.author.id, 0)
else:
return await ctx.send('placeholder (user already in json file)')
а также в что есть в .json:
"name": "995336851030290462"
}