Class: MatrixQQ::QQ
- Inherits:
-
Object
- Object
- MatrixQQ::QQ
- Defined in:
- lib/matrix_qq/qq/qq.rb,
lib/matrix_qq/qq/log.rb,
lib/matrix_qq/qq/dbus.rb,
lib/matrix_qq/qq/send.rb,
lib/matrix_qq/qq/forward_group/main.rb,
lib/matrix_qq/qq/forward_friend/main.rb,
lib/matrix_qq/qq/forward_group/matrix.rb,
lib/matrix_qq/qq/forward_friend/matrix.rb
Defined Under Namespace
Modules: SendGroup Classes: DBus, ForwardFriend, ForwardGroup, Log
Constant Summary collapse
- SIGN =
%i[ message private group get_group_list event group_upload group_admin group_decrease group_increase friend_add friend_request join_request invite_request all unknow ].freeze
- CQ =
{ 'text' => ->(msg) { msg['data']['text'] }, 'face' => ->(msg) { "[QQ 表情:#{msg['data']['id']}]" }, 'bface' => ->(msg) { "[QQ 原创表情:#{msg['data']['id']}]" }, 'sface' => ->(msg) { "[QQ 小表情:#{msg['data']['id']}]" }, 'emoji' => ->(msg) { [msg['data']['id'].to_i].pack 'U' }, 'record' => ->(___) { '[语音]' }, 'image' => ->(msg) { msg['data']['url'] }, 'at' => ->(msg) { "@#{msg['data']['qq']} " }, 'rps' => ->(msg) { "[#{%w[石头 剪刀 布][msg['data']['type'] - 1]}]" }, 'dice' => ->(msg) { "[掷得 #{msg['data']['type']} 点]" }, 'shake' => ->(___) { '[窗口抖动]' }, 'music' => ->(msg) { "[音乐 #{msg['data'].to_json}]" }, 'share' => ->(msg) { "[分享 #{msg['data'].to_json}]" }, 'rich' => ->(___) { '' }, 'anonymous' => ->(___) { '[匿名消息:]' } }.freeze
Instance Attribute Summary collapse
-
#dbus ⇒ Object
readonly
Returns the value of attribute dbus.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#matrix_dbus ⇒ Object
Returns the value of attribute matrix_dbus.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dbus) ⇒ QQ
constructor
A new instance of QQ.
- #reg ⇒ Object
Constructor Details
Instance Attribute Details
#dbus ⇒ Object (readonly)
Returns the value of attribute dbus.
44 45 46 |
# File 'lib/matrix_qq/qq/qq.rb', line 44 def dbus @dbus end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
44 45 46 |
# File 'lib/matrix_qq/qq/qq.rb', line 44 def info @info end |
#matrix_dbus ⇒ Object
Returns the value of attribute matrix_dbus.
45 46 47 |
# File 'lib/matrix_qq/qq/qq.rb', line 45 def matrix_dbus @matrix_dbus end |