@@ -266,15 +266,16 @@ async def setchannel(ctx: ApplicationContext):
266
266
name = "reactions" ,
267
267
description = "Choose whether you want bot reactions enabled or not."
268
268
)
269
+ @option (name = "value" , description = "Choose a setting value" , type = str , choices = ["on" , "off" ])
269
270
@commands .has_permissions (administrator = True )
270
- async def reactions (ctx : ApplicationContext , setting : str ):
271
- if setting == 'on' :
271
+ async def reactions (ctx : ApplicationContext , value : str ):
272
+ if value == 'on' :
272
273
if autoreactions [str (ctx .guild .id )] == 1 : await ctx .send (':warning: This feature is already enabled.' )
273
274
else :
274
275
autoreactions [str (ctx .guild .id )] = 1
275
276
savedata ()
276
277
await ctx .send (f':white_check_mark: Turned **on** count reactions.' )
277
- elif setting == 'off' :
278
+ elif value == 'off' :
278
279
if autoreactions [str (ctx .guild .id )] == 0 : await ctx .send (':warning: This feature is already disabled' )
279
280
else :
280
281
autoreactions [str (ctx .guild .id )] = 0
@@ -286,10 +287,11 @@ async def reactions(ctx: ApplicationContext, setting: str):
286
287
name = "setnumber" ,
287
288
description = "Set the current count to a new value."
288
289
)
289
- async def setnumber (ctx : ApplicationContext , arg1 : int ):
290
- if arg1 < 1 : raise (discord .ext .commands .BadArgument )
290
+ @option (name = "new_count" , description = "What do you want to set the count to?" , type = int )
291
+ async def setnumber (ctx : ApplicationContext , new_count : int ):
292
+ if new_count < 1 : raise (discord .ext .commands .BadArgument )
291
293
else :
292
- count [str (ctx .channel .id )] = arg1
294
+ count [str (ctx .channel .id )] = new_count
293
295
savedata ()
294
296
await ctx .reply (f':white_check_mark: Count set to `{ count [str (ctx .channel .id )]} `' )
295
297
0 commit comments