mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-12 11:31:03 +01:00
Lucky should error if given no args.
This commit is contained in:
parent
2a611309a7
commit
197238efa0
@ -216,6 +216,8 @@ class Google(callbacks.PrivmsgCommandAndRegexp):
|
||||
|
||||
Does a google search, but only returns the first result.
|
||||
"""
|
||||
if not args:
|
||||
raise callbacks.ArgumentError
|
||||
data = search(self.log, args)
|
||||
if data.results:
|
||||
url = data.results[0].URL
|
||||
|
Loading…
x
Reference in New Issue
Block a user