File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -283,11 +283,19 @@ async def invite(self, ctx: Context):
283
283
284
284
@commands .group (aliases = ("hl" ,))
285
285
async def highlight (self , ctx ):
286
- """Group root for highlights"""
286
+ """Manage your highlight words
287
+
288
+ When a highlight word/phrase is found, the bot will send you a private
289
+ message with the message that triggered it along with contexts."""
287
290
pass
288
291
289
292
@highlight .command ()
290
293
async def add (self , ctx , * , text : str ):
294
+ """Add a new highlight word/phrase
295
+
296
+ Note, highlight words/phrases are NOT case-sensitive!"""
297
+ text = text .lower ()
298
+
291
299
# TODO: Actually add the text to highlights db
292
300
await ctx .try_reply (text )
293
301
@@ -303,11 +311,11 @@ async def onHighlight(self, message: discord.Message):
303
311
return
304
312
305
313
for hl , owners in guildHighlight .items ():
306
- if hl not in message .content :
314
+ if hl not in message .content . lower () :
307
315
continue
308
316
309
317
# Getting context
310
- msgs : list [discord .Message ] = [message ]
318
+ msgs : List [discord .Message ] = [message ]
311
319
async for history in channel .history (limit = 4 , before = message .created_at ):
312
320
msgs .append (history )
313
321
You can’t perform that action at this time.
0 commit comments