yaaaay.
parent
6ab55a865b
commit
8d963bcd62
|
@ -1,8 +1,21 @@
|
||||||
Client.register_command("jan") { |args|
|
Client.register_command("jantest") { |args|
|
||||||
|
if not args[0].nil? then
|
||||||
|
if args[0].force_encoding("UTF-8") =~ /ał$/ then
|
||||||
|
predicate = args[0]
|
||||||
|
object = File.readlines(Config[:commands][:jan][:object]).sample.strip
|
||||||
|
else
|
||||||
|
predicate = File.readlines(Config[:commands][:jan][:predicates]).sample.strip
|
||||||
|
object = args[0]
|
||||||
|
end
|
||||||
|
else
|
||||||
|
object = File.readlines(Config[:commands][:jan][:object]).sample.strip
|
||||||
|
predicate = File.readlines(Config[:commands][:jan][:predicates]).sample.strip
|
||||||
|
end
|
||||||
|
|
||||||
[
|
[
|
||||||
Config[:commands][:jan][:subject],
|
Config[:commands][:jan][:subject],
|
||||||
File.readlines(Config[:commands][:jan][:predicates]).sample.strip,
|
predicate,
|
||||||
Config[:commands][:jan][:attribute],
|
Config[:commands][:jan][:attribute],
|
||||||
File.readlines(Config[:commands][:jan][:object]).sample.strip
|
object
|
||||||
].join " "
|
].join " "
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue