mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 16:50:10 +00:00
Move various system functionality to system.py
This commit is contained in:
parent
49b4e4c1ef
commit
a079db8be0
8 changed files with 182 additions and 102 deletions
|
|
@ -1,7 +1,5 @@
|
|||
import logging
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
|
||||
import discord
|
||||
import humanize
|
||||
|
|
@ -16,9 +14,6 @@ logger = logging.getLogger("pluralkit.utils")
|
|||
def escape(s):
|
||||
return s.replace("`", "\\`")
|
||||
|
||||
def generate_hid() -> str:
|
||||
return "".join(random.choices(string.ascii_lowercase, k=5))
|
||||
|
||||
def bounds_check_member_name(new_name, system_tag):
|
||||
if len(new_name) > 32:
|
||||
return "Name cannot be longer than 32 characters."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue