Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
雪狼之夜
微信群聊机器人(javascript开发的)
提交
fa919910
微
微信群聊机器人(javascript开发的)
项目概览
雪狼之夜
/
微信群聊机器人(javascript开发的)
与 Fork 源项目一致
Fork自
inscode / NodeJS
通知
1
Star
31
Fork
82
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
微
微信群聊机器人(javascript开发的)
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fa919910
编写于
11月 15, 2023
作者:
X
xuelang532777032
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Auto Commit
上级
a43591e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
12 deletion
+9
-12
index.js
index.js
+9
-12
未找到文件。
index.js
浏览文件 @
fa919910
...
@@ -170,7 +170,7 @@ const userEvent = {
...
@@ -170,7 +170,7 @@ const userEvent = {
async
hli
(
room
,
text
)
{
async
hli
(
room
,
text
)
{
let
m
=
this
;
let
m
=
this
;
let
msg
=
await
m
.
ajax
(
`https://api.lolimi.cn/API/huang/api.php`
,
{},
"
get
"
)
let
msg
=
await
m
.
ajax
(
`https://api.lolimi.cn/API/huang/api.php`
,
{},
"
get
"
)
await
room
.
say
(
msg
.
data
.
text
)
await
room
.
say
(
msg
.
data
.
text
+
m
.
sayEnd
)
},
},
//微信机器人人
//微信机器人人
async
weixinChatbot
(
room
,
text
)
{
async
weixinChatbot
(
room
,
text
)
{
...
@@ -193,7 +193,7 @@ const userEvent = {
...
@@ -193,7 +193,7 @@ const userEvent = {
if
(
text
.
indexOf
(
"
解第
"
)
!=
-
1
)
{
if
(
text
.
indexOf
(
"
解第
"
)
!=
-
1
)
{
answer
=
JSON
.
parse
(
answer
).
multimsg
[
0
]
answer
=
JSON
.
parse
(
answer
).
multimsg
[
0
]
}
}
await
room
.
say
(
answer
)
await
room
.
say
(
answer
+
m
.
sayEnd
)
},
},
//取名
//取名
async
naming
(
room
,
text
)
{
async
naming
(
room
,
text
)
{
...
@@ -215,10 +215,8 @@ const userEvent = {
...
@@ -215,10 +215,8 @@ const userEvent = {
str
+=
v
.
naming
+
"
,
"
str
+=
v
.
naming
+
"
,
"
})
})
str
=
str
.
substr
(
0
,
str
.
length
-
1
)
str
=
str
.
substr
(
0
,
str
.
length
-
1
)
await
room
.
say
(
str
)
await
room
.
say
(
str
+
m
.
sayEnd
)
},
},
//转语言
//转语言
async
toVoice
(
room
,
text
)
{
async
toVoice
(
room
,
text
)
{
let
m
=
this
;
let
m
=
this
;
...
@@ -231,7 +229,7 @@ const userEvent = {
...
@@ -231,7 +229,7 @@ const userEvent = {
async
answer
(
room
,
text
)
{
async
answer
(
room
,
text
)
{
let
m
=
this
;
let
m
=
this
;
let
res
=
await
m
.
ajax
(
"
https://api.wer.plus/api/bay
"
,
null
,
"
get
"
)
let
res
=
await
m
.
ajax
(
"
https://api.wer.plus/api/bay
"
,
null
,
"
get
"
)
debugger
m
.
sayMP3
(
res
.
data
.
data
.
comment
.
split
(
"
|
"
)[
0
],
room
)
m
.
sayMP3
(
res
.
data
.
data
.
comment
.
split
(
"
|
"
)[
0
],
room
)
},
},
...
@@ -250,7 +248,7 @@ const userEvent = {
...
@@ -250,7 +248,7 @@ const userEvent = {
var
radomArr
=
res
.
data
.
result
var
radomArr
=
res
.
data
.
result
var
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
radomArr
.
length
)
var
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
radomArr
.
length
)
var
obj
=
radomArr
[
randomIndex
];
var
obj
=
radomArr
[
randomIndex
];
await
room
.
say
(
obj
.
date
+
"
:
"
+
obj
.
title
)
await
room
.
say
(
obj
.
date
+
"
:
"
+
obj
.
title
+
m
.
sayEnd
)
},
},
//去水印 1
//去水印 1
...
@@ -260,8 +258,7 @@ const userEvent = {
...
@@ -260,8 +258,7 @@ const userEvent = {
// await room.say(url)
// await room.say(url)
let
res
=
await
this
.
ajax
(
"
http://api.xn--7gqa009h.top/api/dy_jx?a=
"
+
text
,
{},
"
get
"
)
let
res
=
await
this
.
ajax
(
"
http://api.xn--7gqa009h.top/api/dy_jx?a=
"
+
text
,
{},
"
get
"
)
console
.
log
(
res
.
data
.
url
)
console
.
log
(
res
.
data
.
url
)
await
room
.
say
(
text
+
"
解析后下载地址:
"
+
res
.
data
.
url
+
m
.
sayEnd
)
await
room
.
say
(
text
+
"
解析后下载地址:
"
+
res
.
data
.
url
)
}
}
},
},
...
@@ -269,8 +266,7 @@ const userEvent = {
...
@@ -269,8 +266,7 @@ const userEvent = {
async
animationPic
(
room
,
text
)
{
async
animationPic
(
room
,
text
)
{
let
res
=
await
this
.
ajax
(
"
https://api.oick.cn/random/api.php?type=pc
"
,
{},
"
get
"
)
let
res
=
await
this
.
ajax
(
"
https://api.oick.cn/random/api.php?type=pc
"
,
{},
"
get
"
)
this
.
sayImg
(
room
,
res
.
request
.
protocol
+
"
//
"
+
res
.
request
.
host
+
res
.
request
.
path
)
this
.
sayImg
(
room
,
res
.
request
.
protocol
+
"
//
"
+
res
.
request
.
host
+
res
.
request
.
path
)
await
room
.
say
(
m
.
sayEnd
)
},
},
ajax
:
ajax
,
ajax
:
ajax
,
async
sayImg
(
room
,
url
)
{
async
sayImg
(
room
,
url
)
{
...
@@ -287,6 +283,7 @@ const userEvent = {
...
@@ -287,6 +283,7 @@ const userEvent = {
null
,
"
get
"
)
null
,
"
get
"
)
fileBox
=
FileBox
.
fromUrl
(
res
.
data
.
music
);
fileBox
=
FileBox
.
fromUrl
(
res
.
data
.
music
);
await
room
.
say
(
fileBox
)
await
room
.
say
(
fileBox
)
await
room
.
say
(
m
.
sayEnd
)
},
},
sayEnd
:
"
/n来至公众号:'程序员野区'的作者开源项目/n--------/
nhttps://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI1NjAxODkzMg==
"
sayEnd
:
"
\n
----------------
\n
来至公众号:'程序员野区'的作者开源项目
\
n
https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI1NjAxODkzMg==
"
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录