mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
commit
This commit is contained in:
parent
5220201434
commit
16adaea355
3 changed files with 20 additions and 4 deletions
|
@ -13,8 +13,6 @@ class DndinfoCommand(Command):
|
||||||
tables = {DndCharacter, DndActiveCharacter}
|
tables = {DndCharacter, DndActiveCharacter}
|
||||||
|
|
||||||
async def run(self, args: CommandArgs, data: CommandData) -> None:
|
async def run(self, args: CommandArgs, data: CommandData) -> None:
|
||||||
author = await data.get_author(error_if_none=True)
|
|
||||||
|
|
||||||
active_character = await get_active_character(data)
|
active_character = await get_active_character(data)
|
||||||
char = active_character.character
|
char = active_character.character
|
||||||
|
|
||||||
|
|
19
rpgpack/tables/dndbattle.py
Normal file
19
rpgpack/tables/dndbattle.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
from sqlalchemy import *
|
||||||
|
from sqlalchemy.orm import *
|
||||||
|
from sqlalchemy.ext.declarative import declared_attr
|
||||||
|
|
||||||
|
|
||||||
|
class DndBattle:
|
||||||
|
__tablename__ = "dndbattle"
|
||||||
|
|
||||||
|
@declared_attr
|
||||||
|
def id(self):
|
||||||
|
return Column(Integer, primary_key=True)
|
||||||
|
|
||||||
|
@declared_attr
|
||||||
|
def name(self):
|
||||||
|
return Column(String, nullable=False)
|
||||||
|
|
||||||
|
@declared_attr
|
||||||
|
def description(self):
|
||||||
|
return Column(String, nullable=False)
|
|
@ -1,2 +1 @@
|
||||||
semantic = "5.1.4"
|
semantic = "5.2"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue