forked from gooberinc/goober
made code work on < python3.12
This commit is contained in:
parent
90d301c054
commit
375e5deaf2
4 changed files with 8 additions and 32 deletions
28
example.env
28
example.env
|
@ -1,28 +0,0 @@
|
|||
DISCORDBOTTOKEN=
|
||||
BOTPREFIX="g."
|
||||
PINGLINE="The Beretta fires fast and won't make you feel any better!"
|
||||
BLACKLISTEDUSERS=
|
||||
OWNERID=
|
||||
USERTRAINENABLED="true"
|
||||
SHOWMEMENABLED="true"
|
||||
LOCALE=fi
|
||||
NAME=goober
|
||||
AUTOUPDATE="True"
|
||||
SONG="Basket Case - Green Day"
|
||||
CHECKSDISABLED="Frue"
|
||||
REACT="True"
|
||||
POSITIVEGIFS="https://media.discordapp.net/attachments/821047460151427135/1181371808566493184/jjpQGeno.gif, https://tenor.com/view/chill-guy-my-new-character-gif-2777893510283028272,https://tenor.com/view/goodnight-goodnight-friends-weezer-weezer-goodnight-gif-7322052181075806988"
|
||||
SPLASHTEXT="
|
||||
|
||||
SS\
|
||||
SS |
|
||||
SSSSSS\ SSSSSS\ SSSSSS\ SSSSSSS\ SSSSSS\ SSSSSS\
|
||||
SS __SS\ SS __SS\ SS __SS\ SS __SS\ SS __SS\ SS __SS\
|
||||
SS / SS |SS / SS |SS / SS |SS | SS |SSSSSSSS |SS | \__|
|
||||
SS | SS |SS | SS |SS | SS |SS | SS |SS ____|SS |
|
||||
\SSSSSSS |\SSSSSS |\SSSSSS |SSSSSSS |\SSSSSSS\ SS |
|
||||
\____SS | \______/ \______/ \_______/ \_______|\__|
|
||||
SS\ SS |
|
||||
\SSSSSS |
|
||||
\______/
|
||||
"
|
|
@ -75,7 +75,10 @@ class Script:
|
|||
self.script: str = ""
|
||||
|
||||
def add_line(self, content, indent: int = 0, newline: bool = True) -> None:
|
||||
self.script += f"{'\t' * indent}{content}{'\n' if newline else ''}"
|
||||
tabs = "\t" * indent
|
||||
newline_content = "\n" if newline else ""
|
||||
|
||||
self.script += f"{tabs}{content}{newline_content}"
|
||||
|
||||
|
||||
def process_name(key: str) -> str:
|
||||
|
@ -170,7 +173,7 @@ class GenerateScript:
|
|||
args = find_args(self.primary_data[key])
|
||||
|
||||
self.script.add_line(
|
||||
f"def {process_name(key)}({convert_args(','.join([*args, "lang:str|None=None" if self.uses_typing else "lang"]), args, "none")}):"
|
||||
f"def {process_name(key)}({convert_args(','.join([*args, 'lang:str|None=None' if self.uses_typing else 'lang']), args, 'none')}):"
|
||||
)
|
||||
if self.generate_comments:
|
||||
self.script.add_line('"""', 1)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import json
|
||||
import os
|
||||
from typing import Dict, List, Literal, Mapping, Any, NotRequired, TypedDict
|
||||
from typing import Dict, List, Literal, Mapping, Any, TypedDict
|
||||
from modules.keys import Language
|
||||
import logging
|
||||
import copy
|
||||
|
|
|
@ -7,4 +7,5 @@ psutil
|
|||
better_profanity
|
||||
python-dotenv
|
||||
dotenv
|
||||
pillow
|
||||
pillow
|
||||
watchdog
|
Loading…
Add table
Add a link
Reference in a new issue