跨平台适配
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2025-09-29 00:41:29 +08:00
parent adebd51605
commit c8dae680a3
4 changed files with 31 additions and 11 deletions

View File

@ -7,14 +7,14 @@ number_arts = {
''',
2: ''' ____
|___ \
|___ \\
__) |
/ __/
|_____|
''',
3: ''' _____
|___ /
|_ \
|_ \\
___) |
|____/
''',
@ -26,15 +26,15 @@ number_arts = {
''',
5: ''' ____
| ___|
|___ \
|___ \\
___) |
|____/
''',
6: ''' __
/ /_
| '_ \
| '_ \\
| (_) |
\___/
\\___/
'''
}
@ -42,5 +42,13 @@ def get_random_number(min: int = 1, max: int = 6) -> int:
import random
return random.randint(min, max)
async def roll_dice() -> str:
return number_arts[get_random_number()]
def roll_dice(wide: bool = False) -> str:
raw = number_arts[get_random_number()]
if wide:
raw = (raw
.replace("/", "")
.replace("\\", "")
.replace("_", "_")
.replace("|", "")
.replace(" ", " "))
return raw