Есть отдельный json файл с матами, Записал все маты вроде правильно, Весь код думаю не стоит скидывать
Это код с общей части:
'''python
@dp.message_handler()
async def echo_send(message : types.Message):
if {i.lower().translate(str.maketrans('', '', string.punctuation)) for i in
message.text.split(' ') }\
.intersection(set(json.load(open('cenz.json')))) != set():
await message.reply('Маты запрещены')
await message.delete()
а это импорт:
import json
ar = []
with open('cenz.txt', encoding = 'utf-8') as r:
for i in r:
n = i.lower().split('\n')[1]
if n != '':
ar.append(n)
with open("cenz.json", 'w', encoding = 'utf-8') as e:
json.dump(ar,e)
Вот ошибка:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)