yaaaay.
This commit is contained in:
parent
6ab55a865b
commit
8d963bcd62
1 changed files with 16 additions and 3 deletions
|
@ -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],
|
||||
File.readlines(Config[:commands][:jan][:predicates]).sample.strip,
|
||||
predicate,
|
||||
Config[:commands][:jan][:attribute],
|
||||
File.readlines(Config[:commands][:jan][:object]).sample.strip
|
||||
object
|
||||
].join " "
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue