Giter Site home page Giter Site logo

oicq-guild's Introduction

oicq-guild

oicq guild plugin

Install:

npm i oicq-guild

Usage:

const { createClient } = require("oicq")
const { GuildApp } = require("oicq-guild")

// input with your account and password
const account = 0
const password = ""

// create oicq client
const client = createClient(account)
client.login(password)

// create guild app and bind it to an oicq client
const app = GuildApp.bind(client)

app.on("ready", function () {
  console.log("My guild list:")
  console.log(this.guilds)
})

app.on("message", e => {
  console.log(e)
  if (e.raw_message === "hello")
    e.reply(`Hello, ${e.sender.nickname}!`)
})

how to clear the slider captcha:

https://github.com/takayama-lily/oicq/wiki/01.使用密码登录-(滑动验证码教程)

protobuf分析工具:

https://protobuf-decoder.netlify.app
https://github.com/takayama-lily/unpack-tools

oicq-guild's People

Contributors

takayama-lily avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

oicq-guild's Issues

为啥监听不到消息。

import './config/init.js'
import ListenerLoader from './listener/loader.js'
import { Client } from 'oicq'
import { GuildApp } from 'oicq-guild'
import cfg from './config/config.js'

export default class Yunzai extends Client {
  constructor (uin, conf) {
    super(uin, conf)
    /** 加载oicq事件监听 */
    ListenerLoader.load(this)
  }

  /** 登录机器人 */
  static async run () {
    const bot = new Yunzai(cfg.qq, cfg.bot)
    await bot.login(cfg.pwd)
    const app = GuildApp.bind(bot)
    app.on("ready", function () {
      console.log("My guild list:")
      console.log(this.guilds)
    })
    app.on("message", e => {
      console.log(e)
      if (e.raw_message === "hello")
        e.reply(`Hello, ${e.sender.nickname}!`)
    })
    return bot
  }
}

ready触发了,但是message一直无法触发

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.