@@ -43,7 +43,7 @@ def __init__(self, bot: Red, db: Union[str, bytes, os.PathLike, None] = None):
43
43
super ().__init__ ()
44
44
45
45
async def initialize (self ):
46
- # Casetype registration
46
+ # Case-type registration
47
47
with contextlib .suppress (RuntimeError ):
48
48
await modlog .register_casetype (** _CASETYPE )
49
49
@@ -144,7 +144,7 @@ async def create_case(
144
144
Parameters
145
145
----------
146
146
member : discord.Member
147
- The member who was striked .
147
+ The member who has received a strike .
148
148
timestamp : datetime.datetime
149
149
The timestamp for the strike.
150
150
reason : str
@@ -236,6 +236,8 @@ async def strikes(self, ctx: commands.Context, *, member: discord.Member):
236
236
)
237
237
)
238
238
239
+ @checks .mod_or_permissions (kick_members = True )
240
+ @commands .guild_only ()
239
241
@commands .command ()
240
242
async def allstrikes (self , ctx : commands .Context , num_days : int = 30 ):
241
243
"""Show all recent individual strikes.
@@ -248,7 +250,7 @@ async def allstrikes(self, ctx: commands.Context, num_days: int = 30):
248
250
if num_days < 0 :
249
251
await ctx .send (
250
252
_ (
251
- "You must specify a number of days of at least 0 to retreive "
253
+ "You must specify a number of days of at least 0 to retrieve "
252
254
"strikes from."
253
255
)
254
256
)
@@ -273,7 +275,6 @@ async def allstrikes(self, ctx: commands.Context, num_days: int = 30):
273
275
table = self ._create_table (cursor , ctx .guild , show_id = False )
274
276
275
277
if table :
276
- print (len (table ))
277
278
pages = pagify (table , shorten_by = 25 )
278
279
if num_days :
279
280
await ctx .send (
@@ -296,6 +297,8 @@ async def allstrikes(self, ctx: commands.Context, num_days: int = 30):
296
297
else :
297
298
await ctx .send (_ ("No users in this server have ever received strikes!" ))
298
299
300
+ @checks .mod_or_permissions (kick_members = True )
301
+ @commands .guild_only ()
299
302
@commands .command ()
300
303
async def strikecounts (
301
304
self ,
@@ -324,15 +327,15 @@ async def strikecounts(
324
327
if num_days < 0 :
325
328
await ctx .send (
326
329
_ (
327
- "You must specify a number of days of at least 0 to retreive "
330
+ "You must specify a number of days of at least 0 to retrieve "
328
331
"strikes from."
329
332
)
330
333
)
331
334
return
332
335
if limit < 1 :
333
336
await ctx .send (
334
337
_ (
335
- "You must specify a number of members of at least 1 to retreive "
338
+ "You must specify a number of members of at least 1 to retrieve "
336
339
"strikes for."
337
340
)
338
341
)
@@ -358,7 +361,12 @@ async def strikecounts(
358
361
with self ._db_connect () as conn :
359
362
cursor = conn .execute (
360
363
f"""
361
- SELECT max(id) as most_recent_id, user, count(user) as count FROM strikes
364
+ SELECT
365
+ max(id) as most_recent_id,
366
+ user,
367
+ count(user) as count
368
+ FROM
369
+ strikes
362
370
WHERE
363
371
guild = ?
364
372
AND id > ?
0 commit comments