Commit 7aef8ce8 authored by Jens Langhammer's avatar Jens Langhammer

fix escaped query not being used...

parent 51d7db20
......@@ -29,9 +29,7 @@ class ARKCog:
def escape_query(self, query) -> str:
"""Escape mentions from queries"""
if '@' in query:
return ''
return query
return query.replace('<', '\<').replace('>', '\>')
async def ark(self, query: str, field_to_return: str = None):
......@@ -49,12 +47,12 @@ class ARKCog:
escaped_query = self.escape_query(query)
# Check special queries first
if query in self.special_queries:
if escaped_query in self.special_queries:
cpu_data = ARKCog.do_lookup(query)
cpu_data = ARKCog.do_lookup(escaped_query)
if not cpu_data:
await"I couldn't find anything matching `%s`" % query)
await"I couldn't find anything matching `%s`" % escaped_query)
fields = ['ProductName', 'ClockSpeed', 'ClockSpeedMax',
'CoreCount', 'ThreadCount', 'VTD', 'AESTech']
......@@ -63,7 +61,7 @@ class ARKCog:
# Create embedded message
embed = Embed(title="ARK Search Result",
description="Query was `%s`" % query,
description="Query was `%s`" % escaped_query,
for field in fields:
embed.add_field(name=field, value=cpu_data[field])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment