mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-04 20:25:25 +02:00
Fixed up database modules in webapp
This commit is contained in:
@ -2,18 +2,18 @@ from titanembeds.database import db
|
||||
|
||||
class Guilds(db.Model):
|
||||
__tablename__ = "guilds"
|
||||
id = db.Column(db.Integer, primary_key=True) # Auto incremented id
|
||||
guild_id = db.Column(db.String(255)) # Discord guild id
|
||||
name = db.Column(db.String(255)) # Name
|
||||
unauth_users = db.Column(db.Boolean()) # If allowed unauth users
|
||||
chat_links = db.Column(db.Boolean()) # If users can post links
|
||||
bracket_links = db.Column(db.Boolean()) # If appending brackets to links to prevent embed
|
||||
mentions_limit = db.Column(db.Integer) # If there is a limit on the number of mentions in a msg
|
||||
roles = db.Column(db.Text()) # Guild Roles
|
||||
channels = db.Column(db.Text()) # Guild channels
|
||||
emojis = db.Column(db.Text()) # Guild Emojis
|
||||
owner_id = db.Column(db.String(255)) # Snowflake of the owner
|
||||
icon = db.Column(db.String(255)) # The icon string, null if none
|
||||
id = db.Column(db.Integer, primary_key=True) # Auto incremented id
|
||||
guild_id = db.Column(db.String(255), nullable=False) # Discord guild id
|
||||
name = db.Column(db.String(255), nullable=False) # Name
|
||||
unauth_users = db.Column(db.Boolean(), nullable=False, default=1) # If allowed unauth users
|
||||
chat_links = db.Column(db.Boolean(), nullable=False, default=1) # If users can post links
|
||||
bracket_links = db.Column(db.Boolean(), nullable=False, default=1) # If appending brackets to links to prevent embed
|
||||
mentions_limit = db.Column(db.Integer, nullable=False, default=11) # If there is a limit on the number of mentions in a msg
|
||||
roles = db.Column(db.Text(), nullable=False) # Guild Roles
|
||||
channels = db.Column(db.Text(), nullable=False) # Guild channels
|
||||
emojis = db.Column(db.Text(), nullable=False) # Guild Emojis
|
||||
owner_id = db.Column(db.String(255), nullable=False) # Snowflake of the owner
|
||||
icon = db.Column(db.String(255)) # The icon string, null if none
|
||||
|
||||
def __init__(self, guild_id, name, roles, channels, emojis, owner_id, icon):
|
||||
self.guild_id = guild_id
|
||||
|
Reference in New Issue
Block a user