Skeleton module structure.
This commit is contained in:
53
src/modules/dreamspace/cog.py
Normal file
53
src/modules/dreamspace/cog.py
Normal file
@@ -0,0 +1,53 @@
|
||||
import asyncio
|
||||
|
||||
import discord
|
||||
from discord import app_commands as appcmds
|
||||
from discord.ext import commands as cmds
|
||||
|
||||
from meta import LionCog, LionBot, LionContext
|
||||
from meta.logger import log_wrap
|
||||
from utils.lib import utc_now
|
||||
|
||||
from . import logger
|
||||
|
||||
|
||||
class DreamCog(LionCog):
|
||||
"""
|
||||
Discord-facting interface for Dreamspace Adventures
|
||||
"""
|
||||
|
||||
def __init__(self, bot: LionBot):
|
||||
self.bot = bot
|
||||
self.data = bot.core.datamodel
|
||||
|
||||
async def cog_load(self):
|
||||
pass
|
||||
|
||||
@log_wrap(action="Dreamer migration")
|
||||
async def migrate_dreamer(self, source_profile, target_profile):
|
||||
"""
|
||||
Called when two dreamer profiles need to merge.
|
||||
|
||||
For example, when a user links a second twitch profile.
|
||||
|
||||
:TODO-MARKER:
|
||||
Most of the migration logic is simple, e.g. just update the profileid
|
||||
on the old events to the new profile.
|
||||
The same applies to transactions and probably to inventory items.
|
||||
However, there are some subtle choices to make, such as what to do
|
||||
if both the old and the new profile have an active specimen?
|
||||
A profile can only have one active specimen at a time.
|
||||
There is also the question of how to merge user preferences, when those exist.
|
||||
"""
|
||||
...
|
||||
|
||||
# User command: view their dreamer card, wallet inventory etc
|
||||
|
||||
# (Admin): View events/documents matching certain criteria
|
||||
|
||||
# (User): View own event cards with info?
|
||||
|
||||
# (User): View Specimen
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user