lita-discord_oauth 0.1.1.alpha.33 → 0.1.1.alpha.34
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 +8 -8
- 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: 89289532cb686e06a8924785578402a8fbb1494f
|
4
|
+
data.tar.gz: b4eaeec0b26428d321b514f046fb3ae87b98966b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 022b4bc80dd250e9bc82b9da4fff0fc679c36e04f78e2c4c5f17640d347270dd605a607218eb26fbf9f0bb7dbfbe468e1f7f27432eb1cd341b40fb3c433d7138
|
7
|
+
data.tar.gz: 67c8e164bd1fa64c7a5db7ebc023047f0fd6ef8b71049c11611dc7d1e397ee6bc9aceab4d4d8612dcc50e6242d0dc4836e99e12f8b02067dea38ff0f821279ba
|
@@ -20,13 +20,13 @@ module Lita
|
|
20
20
|
message = event.message
|
21
21
|
message_text = message.content
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
Lita.logger.debug('Message: ' + message)
|
24
|
+
Lita.logger.debug('Author ID: ' + message.author.id)
|
25
25
|
|
26
26
|
user = Lita::User.find_by_id(message.author.id)
|
27
27
|
user = Lita::User.create(user) unless user
|
28
28
|
|
29
|
-
|
29
|
+
Lita.logger.debug('User ID: ' + user.id)
|
30
30
|
|
31
31
|
channel = event.channel.id
|
32
32
|
|
@@ -47,19 +47,19 @@ module Lita
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def send_messages(target, messages)
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
Lita.logger.debug('Target: ' + target)
|
51
|
+
Lita.logger.debug('Target user: ' + target.user)
|
52
|
+
Lita.logger.debug('Target user ID: ' + target.user.id)
|
53
53
|
|
54
54
|
mention = @client.user(target.user.id).mention
|
55
55
|
|
56
|
-
|
56
|
+
Lita.logger.debug('Mention: ' + mention)
|
57
57
|
|
58
58
|
messages.each do |message|
|
59
59
|
if mention
|
60
60
|
message = mention + ',\n' + message
|
61
61
|
|
62
|
-
|
62
|
+
Lita.logger.debug(message)
|
63
63
|
|
64
64
|
@client.send_message(target.room, message)
|
65
65
|
end
|