check for argument in %find
This commit is contained in:
@@ -21,7 +21,7 @@ class FindScanner(Scanner):
|
|||||||
def help() -> str:
|
def help() -> str:
|
||||||
return generate_help(
|
return generate_help(
|
||||||
"find",
|
"find",
|
||||||
"Find specific words or phrases",
|
"Find specific words or phrases (you can use quotes to add spaces in queries)",
|
||||||
args=[
|
args=[
|
||||||
"all/everyone - include bots",
|
"all/everyone - include bots",
|
||||||
],
|
],
|
||||||
@@ -39,6 +39,12 @@ class FindScanner(Scanner):
|
|||||||
async def init(self, message: discord.Message, *args: str) -> bool:
|
async def init(self, message: discord.Message, *args: str) -> bool:
|
||||||
self.matches = defaultdict(Counter)
|
self.matches = defaultdict(Counter)
|
||||||
self.all_messages = "all" in args or "everyone" in args
|
self.all_messages = "all" in args or "everyone" in args
|
||||||
|
if len(self.other_args) == 0:
|
||||||
|
await message.channel.send(
|
||||||
|
"You need to add a query to find (you can use quotes to add spaces in queries)",
|
||||||
|
reference=message,
|
||||||
|
)
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def compute_message(self, channel: ChannelLogs, message: MessageLog):
|
def compute_message(self, channel: ChannelLogs, message: MessageLog):
|
||||||
|
|||||||
Reference in New Issue
Block a user