lita-discord_oauth 0.1.1.alpha.24 → 0.1.1.alpha.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/adapters/discord_oauth.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b65a7fe1eed87a178c8ed90a090991092c9b0d
|
4
|
+
data.tar.gz: 78273b379f1d82c557be20e31d3577b6aebc1f8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88636286b0064e36871837b522236af15d2a21aac813aea926a05e7f83fe272785a4c2c449eb7b92be92dc4f7cb2bb99449e5ea761c448b534cf4040cd16d468
|
7
|
+
data.tar.gz: d88c096f9134f55736317c86857e9652fbdd473bda3f9cba7463669421783682f978d46cec81d2a4eed5965c614365cf3f2a19f6c1a5571c7795a930aa07db58
|
@@ -3,7 +3,6 @@ require 'discordrb'
|
|
3
3
|
module Lita
|
4
4
|
module Adapters
|
5
5
|
class Discord_oauth < Adapter
|
6
|
-
# insert adapter code here
|
7
6
|
config :token, type: String, required: true
|
8
7
|
config :client, type: String, required: true
|
9
8
|
|
@@ -13,11 +12,10 @@ module Lita
|
|
13
12
|
end
|
14
13
|
|
15
14
|
def run
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
@client.ready do
|
15
|
+
STDOUT.write('Starting')
|
16
|
+
@client.ready do |event|
|
20
17
|
robot.trigger(:connected)
|
18
|
+
STDOUT.write('Connected to Discord')
|
21
19
|
end
|
22
20
|
|
23
21
|
@client.message do |event|
|
@@ -32,6 +30,8 @@ module Lita
|
|
32
30
|
source = Lita::Source.new(user: user, room: channel)
|
33
31
|
msg = Lita::Message.new(robot, message_text, source)
|
34
32
|
|
33
|
+
puts msg
|
34
|
+
|
35
35
|
robot.receive(msg) #unless message.from_bot?
|
36
36
|
|
37
37
|
end
|
@@ -50,7 +50,7 @@ module Lita
|
|
50
50
|
if mention
|
51
51
|
message = mention + ',\n' + message
|
52
52
|
|
53
|
-
|
53
|
+
@client.send_message(target.channel, message)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|