Skip to content

Commit

Permalink
init upload
Browse files Browse the repository at this point in the history
  • Loading branch information
LovelyA72 authored Mar 21, 2018
1 parent c3a028c commit de28d2b
Show file tree
Hide file tree
Showing 34 changed files with 1,423 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Autoloader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Created by PhpStorm.
* User: Kilingzhang
* Date: 2017/6/28
* Time: 15:51
*/

spl_autoload_register(function($className){
$path = str_replace('\\', DIRECTORY_SEPARATOR, $className);
$file = __DIR__.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.$path.'.php';
if(is_file($file)) require $file;
});
154 changes: 154 additions & 0 deletions QQfaceId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
14: 微笑
1: 撇嘴
2: 色
3: 发呆
4: 得意
5: 流泪
6: 害羞
7: 闭嘴
8: 睡
9: 大哭
10: 尴尬
11: 发怒
12: 调皮
13: 呲牙
0: 惊讶
15: 难过
16: 酷
96: 冷汗
18: 抓狂
19: 吐
20: 偷笑
21: 可爱
22: 白眼
23: 傲慢
24: 饥饿
25: 困
26: 惊恐
27: 流汗
28: 憨笑
29: 大兵
30: 奋斗
31: 咒骂
32: 疑问
33: 嘘
34: 晕
35: 折磨
36: 衰
37: 骷髅
38: 敲打
39: 再见
97: 擦汗
98: 抠鼻
99: 鼓掌
100: 糗大了
101: 坏笑
102: 左哼哼
103: 右哼哼
104: 哈欠
105: 鄙视
106: 委屈
107: 快哭了
108: 阴险
109: 亲亲
110: 吓
111: 可怜
172: 眨眼睛
182: 笑哭
179: doge
173: 泪奔
174: 无奈
212: 托腮
175: 卖萌
178: 斜眼笑
177: 喷血
180: 惊喜
181: 骚扰
176: 小纠结
183: 我最美
112: 菜刀
89: 西瓜
113: 啤酒
114: 篮球
115: 乒乓
171: 茶
60: 咖啡
61: 饭
46: 猪头
63: 玫瑰
64: 凋谢
116: 示爱
66: 爱心
67: 心碎
53: 蛋糕
54: 闪电
55: 炸弹
56: 刀
57: 足球
117: 瓢虫
59: 便便
75: 月亮
74: 太阳
69: 礼物
49: 拥抱
76: 强
77: 弱
78: 握手
79: 胜利
118: 抱拳
119: 勾引
120: 拳头
121: 差劲
122: 爱你
123: NO
124: OK
42: 爱情
85: 飞吻
43: 跳跳
41: 发抖
86: 怄火
125: 转圈
126: 磕头
127: 回头
128: 跳绳
129: 挥手
130: 激动
131: 街舞
132: 献吻
133: 左太极
134: 右太极
136: 双喜
137: 鞭炮
138: 灯笼
140: K歌
144: 喝彩
145: 祈祷
146: 爆筋
147: 棒棒糖
148: 喝奶
151: 飞机
158: 钞票
168: 药
169: 手枪
188: 蛋
192: 红包
184: 河蟹
185: 羊驼
190: 菊花
187: 幽灵
193: 大笑
194: 不开心
197: 冷漠
198: 呃
199: 好棒
200: 拜托
201: 点赞
202: 无聊
203: 托脸
204: 吃
205: 送花
206: 害怕
207: 花痴
208: 小样儿
210: 飙泪
211: 我不看
23 changes: 23 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "slight-sky/coolq-sdk-php",
"type": "library",
"description": "sdk",
"keywords": ["coolq","library","sdk"],
"homepage": "https://slight-sky.github.io/",
"license": "MIT",
"authors": [
{
"name": "kilingzhang",
"email": "[email protected]",
"homepage" : "https://slight-sky.github.io/"
}
],
"require:": {
"php": ">=5.3"
},
"autoload": {
"psr-0": {
"CoolQ": "src/"
}
}
}
101 changes: 101 additions & 0 deletions src/CoolQSDK/CQ.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?php
/**
* Created by PhpStorm.
* User: Kilingzhang
* Date: 2017/6/28
* Time: 13:52
*/

namespace CoolQSDK;


class CQ
{
public static function enAtCode($QQ)
{
return "[CQ:at,qq=$QQ]";
}

public static function enFaceCode($id)
{
return "[CQ:face,id=$id] ";
}

public static function enEmojiCode($id)
{
return "[CQ:emoji,id=$id] ";
}

public static function enBfaceCode($id)
{
return "[CQ:bface,id=$id] ";
}

public static function enSfaceCode($id)
{
return "[CQ:sface,id=$id] ";
}

public static function enImageCode($url)
{
return "[CQ:image,file=$url] ";
}

public static function enRecordCode($url)
{
return "[CQ:record,file=$url] ";
}

public static function enRpsCode($type)
{
return "[CQ:rps,type=$type] ";
}

public static function enDiceCode($type)
{
return "[CQ:dice,type=$type] ";
}

public static function enShakeCode()
{
return "[CQ:shake] ";
}

public static function enAnonymouseCode($ignore)
{
if ($ignore) {
return "[CQ:anonymous,ignore=true] ";
} else {
return "[CQ:anonymous] ";
}
}

public static function enMusicCode($type, $id)
{
return "[CQ:music,type=$type,id=$id]";
}

public static function enDiyMusicCode($type = custom, $url, $audio, $title, $content, $image)
{
return "[CQ:music,type=custom,url=$url,audio=$audio,title=$title,content=$content,image=$image] ";
}

public static function enShareCode($url, $title, $content, $image)
{
return "[CQ:share,url=$url,title=$title,content=$content,image=$image] ";
}

public static function filterCQAt($string)
{
return preg_replace('/\[CQ:at,qq=\d+\]/','',$string);
}

public static function deCodeHtml($message)
{
$message = preg_replace("/&amp;/", "&", $message);
$message = preg_replace("/&#91;/", "[", $message);
$message = preg_replace("/&#93;/", "]", $message);
return $message;
}

}
Loading

0 comments on commit de28d2b

Please sign in to comment.