fix: align CustomCommandCreator.discord_id model with BIGINT column (#78) #88
@ -2224,7 +2224,7 @@ class Decision(BaseModel):
|
||||
|
||||
class CustomCommandCreator(BaseModel):
|
||||
"""Model for custom command creators."""
|
||||
discord_id = CharField(max_length=20, unique=True) # Discord snowflake ID as string
|
||||
discord_id = BigIntegerField(unique=True)
|
||||
username = CharField(max_length=32)
|
||||
display_name = CharField(max_length=32, null=True)
|
||||
created_at = DateTimeField()
|
||||
|
||||
@ -175,7 +175,7 @@ def delete_custom_command(command_id: int):
|
||||
def get_creator_by_discord_id(discord_id: int):
|
||||
"""Get a creator by Discord ID"""
|
||||
creator = CustomCommandCreator.get_or_none(
|
||||
CustomCommandCreator.discord_id == str(discord_id)
|
||||
CustomCommandCreator.discord_id == discord_id
|
||||
)
|
||||
if creator:
|
||||
return model_to_dict(creator)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user