Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >Błędy:
- C:\Users\Patryk\Dysk Google\Skrypty\Ruby>StatusBot.rb
- C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:88:in `initialize': no implicit conversion of Fixnum into String (TypeError)
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:88:in `new'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:88:in `deserialize'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:104:in `visit_Psych_Nodes_Scalar'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/visitor.rb:15:in `visit'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/visitor.rb:5:in `accept'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:20:in `accept'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:268:in `block in revive_hash'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:266:in `each'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:266:in `each_slice'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:266:in `revive_hash'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:141:in `visit_Psych_Nodes_Mapping'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/visitor.rb:15:in `visit'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/visitor.rb:5:in `accept'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:20:in `accept'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:240:in `visit_Psych_Nodes_Document'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/visitor.rb:15:in `visit'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/visitor.rb:5:in `accept'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:20:in `accept'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/node.rb:35:in `to_ruby'
- from C:/Ruby200-x64/lib/ruby/2.0.0/psych.rb:130:in `load'
- from C:/Users/Patryk/Dysk Google/Skrypty/Ruby/StatusBot.rb:10:in `<main>'
- Plik yml:
- # StatusBot.yml
- URL: !ruby/regexp /https?:\/\/[\S]+/i"
- Ładowanie w Rubym:
- YLoad = YAML::load(File.open("StatusBot.yml"))
- UrlRegex = YLoad["URL"]
- Użycie w Rubym:
- on :action, UrlRegex do |msg|
- msg.reply "#{msg.user} ♫ #{VideoTitle(msg.message)}" or msg.reply "#{msg.user} ♫ #{PlaylistTitle(msg.message)}"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement