Encouraging Problem

Hey guys,

i solved the options = options + db[“encouragements”] problem with adding an .value to it. By now, and even if i do it another way with options.extend it will show up the error code i attached here. Maybe you could help me out. This is the code, error in line 66

import discord
import os
import requests
import json
import random
from replit import db

client = discord.Client()

bad_words = ["arschloch", "hurensohn", "Hurensohn", "Hure", "bastard"]

starter_encouragements = [
  "Wir wünschen die Einhaltung der **Netiquette** ansonsten wirst du gebannt!",
  "Achtung, mute in 5 Minuten",
  "Leb dein Leben du Kek"

# def get_quote():
#   response = requests.get("https://zenquotes.io/api/random")
#   json_data = json.loads(response.text)
#   quote = json_data[0]['q'] + " -" + 
#   json_data[0]['a']
#   return(quote)

def update_encouragements(encouraging_message):
  if "encouragements" in db.keys():
    encouragements = db["encouragements"]
    db["encouragements"] = encouragements
    db["encouragements"] = [encouraging_message] 

def delete_encouragement(index):
  encouragements = db["encouragements"]
  if len(encouragements) > index:
    del encouragements[index]
    db["encouragements"] = encouragements

async def on_ready():
  print('We have logged in as {0.user}'

async def on_message(message):
  if message.author == client.user:
  msg = message.content

  if msg.startswith('Hello'):
    await message.channel.send('Hi {user}')

  if msg.startswith('Hilfe'):
    await message.channel.send('Wenn du Hilfe brauchst, wende dich an einen <@&686472311615914024>')

  if msg.startswith('Willkommen'):
    await message.channel.send('Welcome Buddy')

  options = starter_encouragements
  if "encouragements" in db.keys():
    options = options + db["encouragements"].value

  if any(word in msg for word in bad_words):
    await message.channel.send(random.choice(options))

  if msg.startswith("$new"):
    encouraging_message = msg.split("$new ",1)[1]
    await message.channel.send("New encourage message added.")

  if msg.startswith("$del"):
    encouragements = []
    if "encouragements" in db.keys():
      index = int(msg.split("$del",1)[1])
      encouragements = db["encouragements"]
    await message.channel.send(encouragements)


A post was merged into an existing topic: What am i doing wrong? (Python/Replit)