質問編集履歴

2

書き加え

2019/03/23 19:54

投稿

NoobNakamura
NoobNakamura

スコア13

test CHANGED
File without changes
test CHANGED
@@ -12,6 +12,12 @@
12
12
 
13
13
  本当に初心者過ぎて何を書けばいいのかわからないので教えてくれるとありがたいです
14
14
 
15
+ 追記 
16
+
17
+ mechanizeを導入して実行してみると今度は別のエラーが出ました
18
+
19
+ そちらもわかる人は教えてもらえるとありがたいです
20
+
15
21
 
16
22
 
17
23
 
@@ -25,6 +31,24 @@
25
31
  C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mechanize (LoadError)
26
32
 
27
33
  from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ mechanizeを導入した後のエラー
42
+
43
+ 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)
44
+
45
+ from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/discordrb-3.2.1/lib/discordrb/bot.rb:124:in `initialize'
46
+
47
+ from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/discordrb-3.2.1/lib/discordrb/commands/command_bot.rb:84:in `initialize'
48
+
49
+ from r6.rb:7:in `new'
50
+
51
+ from r6.rb:7:in `<main>'
28
52
 
29
53
  ```
30
54
 
@@ -44,6 +68,18 @@
44
68
 
45
69
  end
46
70
 
71
+
72
+
73
+ mechanizeを導入した後
74
+
75
+ token = token[4..-1] if token.start_with? 'Bot '
76
+
77
+ @token = process_token(@type, token)
78
+
79
+ ignore_bots: attributes[:ignore_bots])
80
+
81
+ bot = Discordrb::Commands::CommandBot.new(
82
+
47
83
  ```
48
84
 
49
85
 
@@ -53,3 +89,5 @@
53
89
 
54
90
 
55
91
  対処法がわからず何もできていません
92
+
93
+ 追記が見づらく大変申し訳ありません

1

コードが間違っていました

2019/03/23 19:54

投稿

NoobNakamura
NoobNakamura

スコア13

test CHANGED
File without changes
test CHANGED
@@ -22,9 +22,9 @@
22
22
 
23
23
  ```
24
24
 
25
- from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
25
+ C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mechanize (LoadError)
26
26
 
27
- from r6.rb:3:in `<main>'
27
+ from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
28
28
 
29
29
  ```
30
30