mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +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.
|
Does a google search, but only returns the first result.
|
||||||
"""
|
"""
|
||||||
|
if not args:
|
||||||
|
raise callbacks.ArgumentError
|
||||||
data = search(self.log, args)
|
data = search(self.log, args)
|
||||||
if data.results:
|
if data.results:
|
||||||
url = data.results[0].URL
|
url = data.results[0].URL
|
||||||
|
Loading…
Reference in New Issue
Block a user