mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-10-30 21:39:09 +01:00 
			
		
		
		
	Implemented Cosmetics and User Custom CSS, closes #7
This commit is contained in:
		| @@ -9,3 +9,5 @@ from authenticated_users import AuthenticatedUsers | ||||
| from guild_members import GuildMembers, list_all_guild_members | ||||
| from keyvalue_properties import KeyValueProperties, set_keyvalproperty, get_keyvalproperty, getexpir_keyvalproperty, setexpir_keyvalproperty, ifexists_keyvalproperty, delete_keyvalproperty | ||||
| from messages import Messages, get_channel_messages | ||||
| from cosmetics import Cosmetics | ||||
| from user_css import UserCSS | ||||
							
								
								
									
										7
									
								
								webapp/titanembeds/database/cosmetics.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								webapp/titanembeds/database/cosmetics.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| from titanembeds.database import db | ||||
|  | ||||
| class Cosmetics(db.Model): | ||||
|     __tablename__ = "cosmetics" | ||||
|     id = db.Column(db.Integer, primary_key=True)    # Auto increment id | ||||
|     user_id = db.Column(db.String(255))             # Discord user id of user of cosmetics | ||||
|     css = db.Column(db.Boolean())                   # If they can create/edit custom CSS | ||||
							
								
								
									
										13
									
								
								webapp/titanembeds/database/user_css.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								webapp/titanembeds/database/user_css.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| from titanembeds.database import db | ||||
|  | ||||
| class UserCSS(db.Model): | ||||
|     __tablename__ = "user_css" | ||||
|     id = db.Column(db.Integer, primary_key=True)    # Auto increment id | ||||
|     name = db.Column(db.String(255))                # CSS Name | ||||
|     user_id = db.Column(db.String(255))             # Discord client ID of the owner of the css (can edit) | ||||
|     css = db.Column(db.Text())                      # CSS contents | ||||
|  | ||||
|     def __init__(self, name, user_id, css=None): | ||||
|         self.name = name | ||||
|         self.user_id = user_id | ||||
|         self.css = css | ||||
		Reference in New Issue
	
	Block a user