初心者、何度もエラーが出ます
discordというボイスチャットツールのBotを作っています
作っているといってもhttps://github.com/aucks/GroupingBot
このURLをそのまま流用しているだけですが...
ファイル名はr6.rbでやっています
本当に初心者過ぎて何を書けばいいのかわからないので教えてくれるとありがたいです
追記
mechanizeを導入して実行してみると今度は別のエラーが出ました
そちらもわかる人は教えてもらえるとありがたいです
エラーメッセージ
C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mechanize (LoadError) from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' mechanizeを導入した後のエラー C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/discordrb-3.2.1/lib/discordrb/bot.rb:871:in `process_token': undefined method `start_with?' for nil:NilClass (NoMethodError) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/discordrb-3.2.1/lib/discordrb/bot.rb:124:in `initialize' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/discordrb-3.2.1/lib/discordrb/commands/command_bot.rb:84:in `initialize' from r6.rb:7:in `new' from r6.rb:7:in `<main>'
該当のソースコード
messages = [] if !added_names.empty? messages << "`#{added_names.join("`, `")}`を追加しました。" end mechanizeを導入した後 token = token[4..-1] if token.start_with? 'Bot ' @token = process_token(@type, token) ignore_bots: attributes[:ignore_bots]) bot = Discordrb::Commands::CommandBot.new(
試したこと
対処法がわからず何もできていません
追記が見づらく大変申し訳ありません
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/03/23 19:41
2019/03/23 20:16
2019/03/24 05:06 編集
2019/03/24 06:33
2019/03/24 07:39