tuxbot-bot/tuxbot/cogs/Admin/models/alias.py

25 lines
592 B
Python
Raw Normal View History

import tortoise
from tortoise import fields
class AliasesModel(tortoise.Model):
id = fields.BigIntField(pk=True)
user_id = fields.BigIntField()
alias = fields.TextField(max_length=255)
command = fields.TextField(max_length=255)
guild = fields.BigIntField()
class Meta:
table = "aliases"
def __str__(self):
2020-11-09 01:18:55 +01:00
return (
f"<AliasesModel id={self.id} "
f"user_id={self.user_id} "
f"alias='{self.alias}' "
f"command='{self.command}' "
f"guild={self.guild}>"
)
__repr__ = __str__