ruby-cqhttp 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile +11 -0
- data/README.md +59 -0
- data/lib/Bot/Api.rb +40 -30
- data/lib/Bot/Bot.rb +26 -26
- data/lib/Bot/Utils.rb +28 -5
- data/lib/ruby-cqhttp.rb +4 -0
- data/ruby-cqhttp.gemspec +11 -7
- metadata +93 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc16893adf2a71ea90af191c3d83c6bbea44417d58b661914f10d1a38284b6fa
|
4
|
+
data.tar.gz: b25414575ff09da58a404ec81fca6832a195f9935b3a5c0e9da1f629db002479
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83bd2c919fd51fe8f356fc91ab2c4a2e04b4f778ff70b492fe0f5d18b07165fb3bf201caecfc818ecca812fd1c7f1e200e6d6b6407233b7d9e34aeeadefbd9e2
|
7
|
+
data.tar.gz: d0dc12c9582ca47c100886c80c4baa2eed56e44a44b42f09d8a1f7b80da01b61619ed7aa652546c9902d9c6c737742987835e6680d83466905bbbb1fbc936938
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# RUBY-CQHTTP
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/ruby-cqhttp.svg)](https://badge.fury.io/rb/ruby-cqhttp)
|
4
|
+
[![yard docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/ruby-cqhttp)
|
5
|
+
|
6
|
+
用 Ruby 写 QQ 机器人!
|
7
|
+
|
8
|
+
## 使用
|
9
|
+
|
10
|
+
安装
|
11
|
+
|
12
|
+
$ gem install ruby-cqhttp
|
13
|
+
|
14
|
+
或者
|
15
|
+
|
16
|
+
在 `Gemfile` 中添加
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem 'eventmachine'
|
20
|
+
```
|
21
|
+
|
22
|
+
然后运行
|
23
|
+
|
24
|
+
$ bundle
|
25
|
+
|
26
|
+
安装
|
27
|
+
|
28
|
+
## 示例
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'ruby-cqhttp'
|
32
|
+
|
33
|
+
CQHttp::Bot.connect host: '127.0.0.1', port: 6700 do |bot|
|
34
|
+
bot.on :logged do |botQQ|
|
35
|
+
CQHttp::Utils.log('我开了欸')
|
36
|
+
end
|
37
|
+
|
38
|
+
bot.on :message do |msg, sdr, tar|
|
39
|
+
CQHttp::Utils.log('我收到消息了欸')
|
40
|
+
end
|
41
|
+
|
42
|
+
# 获取并发出好友撤回的消息
|
43
|
+
bot.on :notice do |notice_type, data|
|
44
|
+
if notice_type == 'friend_recall'
|
45
|
+
req = CQHttp::Api.get_msg data['message_id']
|
46
|
+
bot.sendPrivateMessage req['message'], req['sender']['user_id']
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# 自动同意群邀请和好友请求
|
51
|
+
bot.on :request do |request_type, sub_type, flag|
|
52
|
+
if request_type == 'group'
|
53
|
+
CQHttp::Api.acceptGroupRequest(flag, sub_type) if sub_type == 'invite'
|
54
|
+
elsif request_type == 'friend'
|
55
|
+
CQHttp::Api.acceptFriendRequest(flag)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
```
|
data/lib/Bot/Api.rb
CHANGED
@@ -1,103 +1,113 @@
|
|
1
1
|
module CQHttp
|
2
2
|
class Api
|
3
3
|
attr_accessor :apiUrl
|
4
|
-
|
5
|
-
@apiUrl = 'http://127.0.0.1:5700'
|
6
4
|
class << self
|
5
|
+
def setUrl(apiIp:'127.0.0.1', apiPort:5700)
|
6
|
+
@apiUrl = URI::HTTP.build(host: apiIp, port: apiPort)
|
7
|
+
end
|
7
8
|
def setGroupName(group_id, group_name, url=@apiUrl)
|
9
|
+
url.path = "/set_group_name"
|
8
10
|
ret = { group_id: group_id.to_i, group_name: group_name }.to_json
|
9
|
-
data = JSON.parse(Utils.httpPost(
|
11
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
10
12
|
if data['status'] == 'ok'
|
11
|
-
Utils.log
|
13
|
+
Utils.log '设置群头像成功'
|
12
14
|
else
|
13
|
-
Utils.log
|
15
|
+
Utils.log '设置群头像失败', Logger::WARN
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
17
19
|
def getImage(file, url=@apiUrl) # UNFINSHED
|
20
|
+
url.path = "/get_image"
|
18
21
|
ret = { file: file }.to_json
|
19
|
-
data = JSON.parse(Utils.httpPost(
|
22
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
20
23
|
if data['status'] == 'ok'
|
21
|
-
Utils.log
|
24
|
+
Utils.log '下载图片成功'
|
22
25
|
return data['data']
|
23
26
|
else
|
24
|
-
Utils.log
|
27
|
+
Utils.log '下载图片失败', Logger::WARN
|
25
28
|
end
|
26
29
|
end
|
27
30
|
|
28
31
|
def get_msg(message_id, url=@apiUrl) # UNFINSHED
|
32
|
+
url.path = "/get_msg"
|
29
33
|
ret = { message_id: message_id }.to_json
|
30
|
-
data = JSON.parse(Utils.httpPost(
|
34
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
31
35
|
if data['status'] == 'ok'
|
32
|
-
Utils.log
|
36
|
+
Utils.log '消息获取成功'
|
33
37
|
return data['data']
|
34
38
|
else
|
35
|
-
Utils.log
|
39
|
+
Utils.log '消息获取失败', Logger::WARN
|
36
40
|
end
|
37
41
|
|
38
42
|
end
|
39
43
|
|
40
44
|
def sendPrivateMessage(msg, user_id, url=@apiUrl)
|
45
|
+
url.path = "/send_private_msg"
|
41
46
|
ret = { user_id: user_id, message: msg }.to_json
|
42
|
-
data = JSON.parse(Utils.httpPost(
|
47
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
43
48
|
if data['status'] == 'ok'
|
44
49
|
message_id = data['data']['message_id']
|
45
|
-
Utils.log
|
50
|
+
Utils.log "发送至私聊 #{user_id} 的消息: #{msg} (#{message_id})"
|
46
51
|
return message_id
|
47
52
|
else
|
48
|
-
Utils.log
|
53
|
+
Utils.log '发送消息失败', Logger::WARN
|
49
54
|
end
|
50
55
|
end
|
51
56
|
|
52
57
|
def sendGroupMessage(msg, group_id, url=@apiUrl)
|
58
|
+
url.path = "/send_group_msg"
|
53
59
|
ret = { group_id: group_id, message: msg }.to_json
|
54
|
-
data = JSON.parse(Utils.httpPost(
|
60
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
55
61
|
if data['status'] == 'ok'
|
56
|
-
message_id = data['data']['
|
57
|
-
Utils.log
|
62
|
+
message_id = data['data']['message_id']
|
63
|
+
Utils.log "发送至群 #{group_id} 的消息: #{msg} (#{message_id})"
|
58
64
|
return message_id
|
59
65
|
else
|
60
|
-
Utils.log
|
66
|
+
Utils.log '发送消息失败', Logger::WARN
|
61
67
|
end
|
62
68
|
end
|
63
69
|
|
64
70
|
def acceptFriendRequest(flag, url=@apiUrl)
|
71
|
+
url.path = "/set_friend_add_request"
|
65
72
|
ret = { flag: flag, approve: true }.to_json
|
66
|
-
data = JSON.parse(Utils.httpPost(
|
73
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
67
74
|
if data['status'] == 'ok'
|
68
|
-
Utils.log
|
75
|
+
Utils.log '已通过好友请求'
|
69
76
|
else
|
70
|
-
Utils.log
|
77
|
+
Utils.log '请求通过失败', Logger::WARN
|
71
78
|
end
|
72
79
|
end
|
73
80
|
|
74
81
|
def refuseFriendRequest(flag, url=@apiUrl)
|
82
|
+
url.path = "/set_friend_add_request"
|
75
83
|
ret = { flag: flag, approve: false }.to_json
|
76
|
-
user_id = JSON.parse(Utils.httpPost(
|
84
|
+
user_id = JSON.parse(Utils.httpPost(url, ret))
|
77
85
|
if data['status'] == 'ok'
|
78
|
-
Utils.log
|
86
|
+
Utils.log '已拒绝好友请求'
|
79
87
|
else
|
80
|
-
Utils.log
|
88
|
+
Utils.log '请求拒绝失败', Logger::WARN
|
81
89
|
end
|
82
90
|
end
|
83
91
|
|
84
92
|
def acceptGroupRequest(flag, sub_type, url=@apiUrl)
|
93
|
+
url.path = "/set_group_add_request"
|
85
94
|
ret = { flag: flag, sub_type: sub_type, approve: true }.to_json
|
86
|
-
data = JSON.parse(Utils.httpPost(
|
95
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
87
96
|
if data['status'] == 'ok'
|
88
|
-
Utils.log
|
97
|
+
Utils.log '已通过加群请求'
|
89
98
|
else
|
90
|
-
Utils.log
|
99
|
+
Utils.log '请求通过失败', Logger::WARN
|
91
100
|
end
|
92
101
|
end
|
93
102
|
|
94
103
|
def refuseGroupRequest(flag, sub_type, url=@apiUrl)
|
104
|
+
url.path = "/set_group_add_request"
|
95
105
|
ret = { flag: flag, sub_type: sub_type, approve: false }.to_json
|
96
|
-
data = JSON.parse(Utils.httpPost(
|
106
|
+
data = JSON.parse(Utils.httpPost(url, ret))
|
97
107
|
if data['status'] == 'ok'
|
98
|
-
Utils.log
|
108
|
+
Utils.log '已拒绝加群请求'
|
99
109
|
else
|
100
|
-
Utils.log
|
110
|
+
Utils.log '请求拒绝失败', Logger::WARN
|
101
111
|
end
|
102
112
|
end
|
103
113
|
end
|
data/lib/Bot/Bot.rb
CHANGED
@@ -2,9 +2,11 @@ module CQHttp
|
|
2
2
|
class Bot
|
3
3
|
Sender = Struct.new(:age, :member_role, :card, :qqlevel, :nickname, :title, :sex)
|
4
4
|
Target = Struct.new(:messagetype, :time, :group_id, :user_id, :message_id, :message)
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
def self.connect(host:, port:)
|
6
|
+
url = URI::WS.build(host: host, port: port)
|
7
|
+
Api.setUrl()
|
8
|
+
Utils.log '正在连接到 ' << url.to_s
|
9
|
+
client = ::CQHttp::Bot::WebSocket.new(url)
|
8
10
|
yield client if block_given?
|
9
11
|
client.connect
|
10
12
|
client
|
@@ -12,30 +14,25 @@ module CQHttp
|
|
12
14
|
|
13
15
|
class WebSocket
|
14
16
|
attr_accessor :url
|
15
|
-
attr_accessor :debugmode
|
16
17
|
attr_accessor :selfID
|
17
18
|
|
18
19
|
include EventEmitter
|
19
20
|
|
20
|
-
def initialize(url
|
21
|
+
def initialize(url)
|
21
22
|
@url = url
|
22
|
-
@debugmode = debugmode
|
23
23
|
end
|
24
24
|
|
25
25
|
def connect
|
26
26
|
EM.run do
|
27
|
-
@ws = Faye::WebSocket::Client.new(@url)
|
28
|
-
|
29
|
-
@ws.on :open do
|
30
|
-
end
|
27
|
+
@ws = Faye::WebSocket::Client.new(@url.to_s)
|
31
28
|
|
32
29
|
@ws.on :message do |event|
|
33
30
|
Thread.new { dataParse(event.data)}
|
34
31
|
end
|
35
32
|
|
36
|
-
@ws.on :close do
|
37
|
-
emit :close
|
38
|
-
Utils.log
|
33
|
+
@ws.on :close do |event|
|
34
|
+
emit :close, event
|
35
|
+
Utils.log '连接断开'
|
39
36
|
@ws = nil
|
40
37
|
exit
|
41
38
|
end
|
@@ -50,15 +47,20 @@ module CQHttp
|
|
50
47
|
|
51
48
|
def sendPrivateMessage(msg, user_id)
|
52
49
|
ret = { action: 'send_private_msg', params: { user_id: user_id, message: msg }, echo: 'BotPrivateMessage' }.to_json
|
53
|
-
Utils.log
|
50
|
+
Utils.log "发送至私聊 #{user_id} 的消息: #{msg}"
|
54
51
|
@ws.send ret
|
55
52
|
end
|
56
53
|
|
57
54
|
def sendGroupMessage(msg, group_id)
|
58
55
|
ret = { action: 'send_group_msg', params: { group_id: group_id, message: msg }, echo: 'BotGroupMessage' }.to_json
|
59
|
-
Utils.log
|
56
|
+
Utils.log "发送至群 #{group_id} 的消息: #{msg}"
|
60
57
|
@ws.send ret
|
61
58
|
end
|
59
|
+
|
60
|
+
def sendMessage(msg, target)
|
61
|
+
sendGroupMessage msg, target.group_id if target.messagetype == 'group'
|
62
|
+
sendPrivateMessage msg, target.user_id if target.messagetype == 'private'
|
63
|
+
end
|
62
64
|
|
63
65
|
private
|
64
66
|
|
@@ -69,12 +71,10 @@ module CQHttp
|
|
69
71
|
tar.time = msg['time']
|
70
72
|
if msg['meta_event_type'] == 'lifecycle' && msg['sub_type'] == 'connect'
|
71
73
|
@selfID = msg['self_id']
|
72
|
-
Utils.log
|
74
|
+
Utils.log "连接成功, BotQQ: #{@selfID}"
|
73
75
|
emit :logged, @selfID
|
74
76
|
end
|
75
|
-
if
|
76
|
-
puts msg if msg['meta_event_type'] != 'heartbeat' # 过滤心跳
|
77
|
-
end
|
77
|
+
Utils.log msg, Logger::DEBUG if msg['meta_event_type'] != 'heartbeat' # 过滤心跳
|
78
78
|
case msg['post_type']
|
79
79
|
#
|
80
80
|
# 请求事件
|
@@ -83,10 +83,10 @@ module CQHttp
|
|
83
83
|
case msg['request_type']
|
84
84
|
when 'group'
|
85
85
|
if msg['sub_type'] == 'invite' # 加群邀请
|
86
|
-
Utils.log
|
86
|
+
Utils.log "收到用户 #{msg['user_id']} 的加群 #{msg['group_id']} 请求 (#{msg['flag']})"
|
87
87
|
end
|
88
88
|
when 'friend' # 加好友邀请
|
89
|
-
Utils.log
|
89
|
+
Utils.log "收到用户 #{msg['user_id']} 的好友请求 (#{msg['flag']})"
|
90
90
|
end
|
91
91
|
emit :request, msg['request_type'], msg['sub_type'], msg['flag']
|
92
92
|
#
|
@@ -96,12 +96,12 @@ module CQHttp
|
|
96
96
|
case msg['notice_type']
|
97
97
|
when 'group_decrease' # 群数量减少
|
98
98
|
if msg['sub_type'] == 'kick_me' # 被踢出
|
99
|
-
Utils.log
|
99
|
+
Utils.log "被 #{msg['operator_id']} 踢出群 #{msg['group_id']}"
|
100
100
|
end
|
101
101
|
when 'group_recall'
|
102
|
-
Utils.log
|
102
|
+
Utils.log "群 #{msg['group_id']} 中 #{msg['user_id']} 撤回了一条消息 (#{msg['message_id']})"
|
103
103
|
when 'friend_recall'
|
104
|
-
Utils.log
|
104
|
+
Utils.log "好友 #{msg['user_id']} 撤回了一条消息 (#{msg['message_id']})"
|
105
105
|
end
|
106
106
|
emit :notice, msg['notice_type'], msg
|
107
107
|
|
@@ -123,10 +123,10 @@ module CQHttp
|
|
123
123
|
sdr.member_role = msg['sender']['role'] # 群成员地位
|
124
124
|
sdr.qqlevel = msg['sender']['level'] # 群成员等级
|
125
125
|
if tar.messagetype == 'group' # 判断是否为群聊
|
126
|
-
Utils.log
|
126
|
+
Utils.log "收到群 #{tar.group_id} 内 #{sdr.nickname}(#{tar.user_id}) 的消息: #{tar.message} (#{tar.message_id})"
|
127
127
|
emit :groupMessage, tar.message, sdr, tar
|
128
128
|
else
|
129
|
-
Utils.log
|
129
|
+
Utils.log "收到好友 #{sdr.nickname}(#{tar.user_id}) 的消息: #{tar.message} (#{tar.message_id})"
|
130
130
|
emit :privateMessage, tar.message, sdr, tar
|
131
131
|
end
|
132
132
|
emit :message, tar.message, sdr, tar
|
data/lib/Bot/Utils.rb
CHANGED
@@ -1,14 +1,37 @@
|
|
1
1
|
module CQHttp
|
2
2
|
class Utils
|
3
|
+
attr_accessor :stdLogger, :fileLogger, :loggerFile
|
3
4
|
class << self
|
4
|
-
def
|
5
|
-
|
5
|
+
def setLogger(logger)
|
6
|
+
logger.level = 'INFO'
|
7
|
+
logger.formatter = proc do |severity, datetime, progname, msg|
|
8
|
+
if progname == nil
|
9
|
+
"[#{datetime.strftime('%Y-%m-%d %H:%M:%S')}][#{severity}]: #{msg.gsub(/\n/,'\n').gsub(/\r/,'\r') }\n"
|
10
|
+
else
|
11
|
+
"[#{datetime.strftime('%Y-%m-%d %H:%M:%S')}][#{progname}][#{severity}]: #{msg.gsub(/\n/,'\n').gsub(/\r/,'\r') }\n"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
logger
|
15
|
+
end
|
16
|
+
def initLogger(loggerFile=nil)
|
17
|
+
@loggerFile = loggerFile
|
18
|
+
@stdLogger = setLogger(Logger.new(STDOUT))
|
19
|
+
@fileLogger = setLogger(Logger.new(@loggerFile, 'daily')) if @loggerFile
|
20
|
+
end
|
21
|
+
|
22
|
+
def setLoggerLevel(loggerLevel)
|
23
|
+
@stdLogger.level = loggerLevel
|
24
|
+
@fileLogger.level = loggerLevel if @loggerFile
|
25
|
+
end
|
26
|
+
|
27
|
+
def log(str, severity=Logger::INFO, app="RUBY-CQHTTP")
|
28
|
+
@stdLogger.log(severity, str, app)
|
29
|
+
@fileLogger.log(severity, str, app) if @loggerFile
|
6
30
|
end
|
7
31
|
|
8
|
-
def httpPost(
|
9
|
-
url = URI.parse args[0]
|
32
|
+
def httpPost(url, ret)
|
10
33
|
req = Net::HTTP::Post.new(url.path, { 'Content-Type' => 'application/json' })
|
11
|
-
req.body =
|
34
|
+
req.body = ret
|
12
35
|
res = Net::HTTP.start(url.hostname, url.port) do |http|
|
13
36
|
http.request(req)
|
14
37
|
end
|
data/lib/ruby-cqhttp.rb
CHANGED
@@ -3,6 +3,9 @@ require 'eventmachine'
|
|
3
3
|
require 'json'
|
4
4
|
require 'event_emitter'
|
5
5
|
require 'net/http'
|
6
|
+
require 'uri/ws'
|
7
|
+
require 'uri'
|
8
|
+
require 'logger'
|
6
9
|
|
7
10
|
module CQHttp
|
8
11
|
autoload :Bot, File.expand_path('Bot/Bot', __dir__)
|
@@ -10,3 +13,4 @@ module CQHttp
|
|
10
13
|
autoload :Utils, File.expand_path('Bot/Utils', __dir__)
|
11
14
|
end
|
12
15
|
|
16
|
+
CQHttp::Utils.initLogger
|
data/ruby-cqhttp.gemspec
CHANGED
@@ -3,19 +3,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'ruby-cqhttp'
|
6
|
-
s.version = '0.0.
|
7
|
-
s.date = '
|
6
|
+
s.version = '0.0.6'
|
7
|
+
s.date = '2021-03-23'
|
8
8
|
s.summary = 'ruby-cqhttp for osucat'
|
9
9
|
s.description = 'ruby-cqhttp for osucat'
|
10
10
|
s.authors = ['fantasyzhjk']
|
11
11
|
s.email = 'fantasyzhjk@outlook.com'
|
12
|
-
s.
|
13
|
-
s.homepage = '
|
12
|
+
s.platform = Gem::Platform::RUBY
|
13
|
+
s.homepage = 'https://github.com/fantasyzhjk/ruby-cqhttp/'
|
14
14
|
s.license = 'MIT'
|
15
15
|
s.files = `git ls-files -z`.split("\x0")
|
16
16
|
s.require_paths = ['lib']
|
17
|
+
s.required_ruby_version = '>= 2.7.0'
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
s.add_runtime_dependency 'json'
|
20
|
+
s.add_runtime_dependency 'logger'
|
21
|
+
s.add_runtime_dependency 'uri', '~> 0.10.1'
|
22
|
+
s.add_runtime_dependency 'eventmachine'
|
23
|
+
s.add_runtime_dependency 'faye-websocket'
|
24
|
+
s.add_runtime_dependency 'event_emitter'
|
21
25
|
end
|
metadata
CHANGED
@@ -1,27 +1,114 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-cqhttp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fantasyzhjk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: logger
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: uri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.10.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.10.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: eventmachine
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: faye-websocket
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: event_emitter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
13
97
|
description: ruby-cqhttp for osucat
|
14
98
|
email: fantasyzhjk@outlook.com
|
15
99
|
executables: []
|
16
100
|
extensions: []
|
17
101
|
extra_rdoc_files: []
|
18
102
|
files:
|
103
|
+
- ".gitignore"
|
104
|
+
- Gemfile
|
105
|
+
- README.md
|
19
106
|
- lib/Bot/Api.rb
|
20
107
|
- lib/Bot/Bot.rb
|
21
108
|
- lib/Bot/Utils.rb
|
22
109
|
- lib/ruby-cqhttp.rb
|
23
110
|
- ruby-cqhttp.gemspec
|
24
|
-
homepage:
|
111
|
+
homepage: https://github.com/fantasyzhjk/ruby-cqhttp/
|
25
112
|
licenses:
|
26
113
|
- MIT
|
27
114
|
metadata: {}
|
@@ -33,14 +120,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
33
120
|
requirements:
|
34
121
|
- - ">="
|
35
122
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
123
|
+
version: 2.7.0
|
37
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
125
|
requirements:
|
39
126
|
- - ">="
|
40
127
|
- !ruby/object:Gem::Version
|
41
128
|
version: '0'
|
42
129
|
requirements: []
|
43
|
-
rubygems_version: 3.
|
130
|
+
rubygems_version: 3.1.2
|
44
131
|
signing_key:
|
45
132
|
specification_version: 4
|
46
133
|
summary: ruby-cqhttp for osucat
|