@@ -13,32 +13,52 @@ def __init__(self, client):
13
13
14
14
@application_checks .is_owner ()
15
15
@nextcord .slash_command ()
16
- async def change_nickname (self , interaction , name : str = nextcord .SlashOption (default = None )):
16
+ async def change_nickname (self , interaction , nickname : str = nextcord .SlashOption (default = None , required = False )):
17
17
"""
18
18
[ADMIN] Change bot nickname.
19
+
20
+ Parameters
21
+ ----------
22
+ interaction: Interaction
23
+ nickname: str
24
+ Enter a new bot nickname.
19
25
"""
20
- await interaction .guild .me .edit (nick = name )
26
+ await interaction .guild .me .edit (nick = nickname )
21
27
22
- if name :
23
- return await interaction .send (f"Display name of bot has changed on **{ name } **" )
28
+ if nickname :
29
+ return await interaction .send (f"Display name of bot has changed on **{ nickname } **" )
24
30
25
- elif name is None :
31
+ elif nickname is None :
26
32
return await interaction .send (f"Nickname has cleared" )
27
33
28
34
@application_checks .is_owner ()
29
35
@nextcord .slash_command (guild_ids = (admin_guilds ,))
30
- async def change_username (self , interaction , name : str = nextcord .SlashOption (default = None )):
36
+ async def change_username (self , interaction , username : str = nextcord .SlashOption (default = None , required = False )):
31
37
"""
32
38
[ADMIN] Change bot username.
39
+
40
+ Parameters
41
+ ----------
42
+ interaction: Interaction
43
+ username: str
44
+ Enter a new bot username.
33
45
"""
34
- await self .client .user .edit (username = name )
35
- await interaction .send (f"Username of bot has changed on **{ name } **" )
46
+ await self .client .user .edit (username = username )
47
+ await interaction .send (f"Username of bot has changed on **{ username } **" )
36
48
37
49
@application_checks .is_owner ()
38
50
@nextcord .slash_command ()
39
51
async def direct_message (self , interaction , user : nextcord .User , message : str ):
40
52
"""
41
53
[ADMIN] Send direct message to selected user.
54
+
55
+ Parameters
56
+ ----------
57
+ interaction: Interaction
58
+ user: nextcord.User
59
+ Choose an user to dm.
60
+ message: str
61
+ Enter a message to send.
42
62
"""
43
63
try :
44
64
await user .send (message )
@@ -59,13 +79,19 @@ async def shutdown(self, interaction):
59
79
60
80
@application_checks .is_owner ()
61
81
@nextcord .slash_command (guild_ids = (admin_guilds ,))
62
- async def eval (self , interaction , content ):
82
+ async def eval (self , interaction , expression : str ):
63
83
"""
64
84
[ADMIN] Evaluates a Python expression.
85
+
86
+ Parameters
87
+ ----------
88
+ interaction: Interaction
89
+ expression: str
90
+ Enter an expression to evaluate.
65
91
"""
66
92
try :
67
- embed = nextcord .Embed (description = content )
68
- embed .add_field (name = "Result" , value = eval (content ))
93
+ embed = nextcord .Embed (description = expression )
94
+ embed .add_field (name = "Result" , value = eval (expression ))
69
95
await interaction .send (embed = embed )
70
96
71
97
except SyntaxError :
0 commit comments