2
2
3
3
from datetime import datetime , timedelta , timezone
4
4
from random import choices , randint
5
- from typing import TYPE_CHECKING
5
+ from typing import TYPE_CHECKING , Optional
6
6
7
7
from nextcord import Embed , Member , AllowedMentions
8
8
from nextcord .ext .commands import Cog , Context , command
@@ -19,17 +19,23 @@ def __init__(self, bot: MyBot):
19
19
self .bot = bot
20
20
21
21
@command (description = "Show your Bolb stats." , aliases = ["bolb_amt" , "bolbs" ])
22
- async def bolb (self , ctx : Context ):
22
+ async def bolb (self , ctx : Context , user : Optional [Member ] = None ):
23
+ if not user :
24
+ user = ctx .author
23
25
async with self .bot .db .execute (
24
- "SELECT bolbs FROM bolb WHERE id=?" , (ctx . author .id ,)
26
+ "SELECT bolbs FROM bolb WHERE id=?" , (user .id ,)
25
27
) as c :
26
28
row = await c .fetchone ()
27
29
amount = row [0 ] if row and row [0 ] else None
28
30
29
31
if not amount :
30
- await ctx .reply ("You have no bolbs. Imagine" )
32
+ await ctx .reply (
33
+ "You have" if not user else f"{ user } has" " no bolbs. Imagine"
34
+ )
31
35
else :
32
- await ctx .reply (f"You have { amount } bolbs" )
36
+ await ctx .reply (
37
+ f"You have" if not user else f"{ user } has" f" { amount } bolbs"
38
+ )
33
39
34
40
@command (description = "Claim your daily bolbs" , aliases = ["dailyclaim" ])
35
41
async def daily (self , ctx : Context ):
0 commit comments