mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2024-11-23 21:41:07 +08:00
22 lines
437 B
Python
22 lines
437 B
Python
from .util import *
|
|
class MarshoContext:
|
|
def __init__(self):
|
|
self.contents = []
|
|
self.count = 0
|
|
|
|
def append(self, content):
|
|
self.contents.append(content)
|
|
|
|
def reset(self):
|
|
self.contents.clear()
|
|
|
|
def addcount(self, num = 1):
|
|
self.count += num
|
|
|
|
def resetcount(self):
|
|
self.count = 0
|
|
|
|
def build(self):
|
|
spell = get_prompt()
|
|
return [spell] + self.contents
|