Skip to content

Commit

Permalink
Update text.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhan258 committed Aug 19, 2023
1 parent 4b05cc9 commit 83f1dce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ export class text extends plugin {

// 发癫
async fd (e) {
let encode
if (e.at) {
const at = e.group.pickMember(e.at)
e.msg = at.info?.card || at.info?.nickname
console.log(e.msg)
encode = at.info?.card || at.info?.nickname
} else {
encode = e.msg.replace(/^#?/, '').trim()
}
let encode = e.msg.replace(/^#?/, '').trim()
if (!encode) return e.reply('输入内容不能为空')

let url = `https://api.hanhanz.com/fd?msg=${encode}`
let url = `https://api.gakki.icu/fd?msg=${encode}`
let response = await fetch(url) // 调用接口获取数据
const text = await response.text()
await this.reply(text)
Expand Down

0 comments on commit 83f1dce

Please sign in to comment.