Add NPC interaction system with memory and quest generation

- Introduced a new NPC system with dynamic NPCs and conversation handling.
- Implemented NPC memory using SQLite to log conversations and manage relationships.
- Added commands for talking to NPCs, listing available NPCs, and generating quests.
- Updated database schema to support NPC conversations and relationships.
- Refactored code structure to separate concerns into cogs and handlers.
This commit is contained in:
2025-09-30 14:12:22 +02:00
parent c8980f785f
commit 7e76353c6a
24 changed files with 7468 additions and 14 deletions
+4 -5
View File
@@ -1,4 +1,3 @@
import discord
from discord.ext import commands
import smtplib
from email.mime.multipart import MIMEMultipart
@@ -10,7 +9,7 @@ from datetime import datetime
class Mail(commands.Cog):
def __init__(self, client):
def __init__(self, client:commands.Bot):
self.client = client
load_dotenv()
from utils.sql_commands import DatabaseManager
@@ -19,7 +18,7 @@ class Mail(commands.Cog):
@commands.is_owner()
@commands.command(name="mail_feedback")
async def mail(self, ctx):
async def mail(self, ctx:commands.Context[commands.Bot]):
password = getenv("EMAILPASS")
username = getenv("EMAILUSER")
server = getenv("EMAILSERVER")
@@ -44,7 +43,7 @@ class Mail(commands.Cog):
msg["Subject"] = "Py feedback"
# Fetch feedback from the database
feedback_rows = self.db.fetch_all("SELECT * FROM feedback")
feedback_rows:list[dict[str,str]] = self.db.fetch_all("SELECT * FROM feedback")
all_feedback = ""
for i, row in enumerate(feedback_rows, 1):
content = html.escape(row["CONTENT"])
@@ -131,5 +130,5 @@ class Mail(commands.Cog):
await ctx.reply(f"Failed to send mail: {e}", delete_after=5)
async def setup(client):
async def setup(client:commands.Bot):
await client.add_cog(Mail(client))