mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
🔀 refactor(functionscalls.py): refactor font_matches dictionary into a FontMatches class for better readability and maintainability
This commit is contained in:
@@ -155,15 +155,25 @@ server_normal_channel_functions = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
font_matches = {
|
class FontMatches:
|
||||||
"standard": "ANSI Regular",
|
def __getitem__(self, key):
|
||||||
"shadow": "ANSI Shadow",
|
if key == "standard":
|
||||||
"money": random.choice(
|
return "ANSI Regular"
|
||||||
|
elif key == "shadow":
|
||||||
|
return "ANSI Shadow"
|
||||||
|
elif key == "money":
|
||||||
|
return random.choice(
|
||||||
["Big Money-ne", "Big Money-nw", "Big Money-se", "Big Money-sw"]
|
["Big Money-ne", "Big Money-nw", "Big Money-se", "Big Money-sw"]
|
||||||
),
|
)
|
||||||
"bloody": "Bloody",
|
elif key == "bloody":
|
||||||
"dos-rebel": "DOS Rebel",
|
return "Bloody"
|
||||||
}
|
elif key == "dos-rebel":
|
||||||
|
return "DOS Rebel"
|
||||||
|
else:
|
||||||
|
raise ValueError(f"Invalid key: {key}")
|
||||||
|
|
||||||
|
# Example usage:
|
||||||
|
font_matches = FontMatches()
|
||||||
|
|
||||||
unsplash_random_image_url = "https://source.unsplash.com/random"
|
unsplash_random_image_url = "https://source.unsplash.com/random"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user