Git Product home page Git Product logo

kookybot's Introduction

Kooky Bot

简体中文 | English

Docs Contributors github stars Build Status KookyBot Release GitHub issues by-label

JVM 平台上的 KOOK (原开黑啦) Bot SDK

开发计划

  • 完整缓存模型 - Role & 操作 API
  • 缓存模型自动更新
  • 登录状态机稳定的自动重连

事件:

  • guild_member_online / guild_member_offline
  • user_updated
  • pinned_message / unpinned_message
  • 其余事件

Quick Starting

请移步文档对应页面

Kotlin Demo

Java Demo

开源协议提示

本项目由AGPL v3协议开源。

未经允许的情况下,禁止闭源使用,所有间接接触(包括但不限于jar依赖、http和ws等网络技术)本项目的程序必须开源。

文档

Docs

还在做,不要急的啦

贡献

本项目期待你的参与!不管是完善事件系统还是增加尚无的HTTP API,抑或是帮助我们完善文档或者添加自己的示例代码,我们都衷心期待每一位的贡献!

衍生项目

优秀的衍生项目可以得到展示的机会!欢迎把你的项目提交给我们!

联系我

邮箱:mailto:[email protected]

Kook:Steve47876#0001

kookybot's People

Contributors

cubik65536 avatar emptyirony avatar hank9999 avatar zly2006 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

kookybot's Issues

[Bug]: `@Filter()` 注解会在没有参数时抛出异常

请选择:

  • 我正在着手修复这个问题

问题描述

当我在使用 `@Filter()` 注解且不带参数时,会出现 `java.lang.ArrayIndexOutOfBoundsException` 异常。但是实际上,这个注解是有无参数使用的需求的,所以应该解决这个问题。

重现

1. 向 client 增加下方代码中的 `StatusController` 作为一个监听类
2. 启动 bot
3. 向频道发送 `!!ping`
4. 出现下方日志错误

相关日志输出(如果有)

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1
	at io.github.kookybot.events.EventManager.callEventRaw(EventManager.kt:3034)
	at io.github.kookybot.client.Client$initWebsocket$1.onMessage(Client.kt:554)
	at io.github.kookybot.client.Client$initWebsocket$1.onMessage(Client.kt:541)
	at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:641)
	at org.java_websocket.drafts.Draft_6455.processFrameBinary(Draft_6455.java:959)
	at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:912)
	at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:401)
	at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:233)
	at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:516)
	at java.base/java.lang.Thread.run(Thread.java:833)

相关 Kotlin 代码(如果有)

class StatusController: Listener {
    @EventHandler
    @Filter("!!ping")
    fun ping(source: CommandSource) {
        source.sendMessage("pong")
    }
}

相关 Java 代码(如果有)

No response

环境

- **操作系统**:macOS Monterey 12.4
- **Java 版本:**:Temurin-17.0.1+12
- **KookyBot 版本 (或 commit 号):**:0.2.1

请确认以下条款

  • 我已经查看了已有 issue 并确定我提交的问题并没有重复
  • 本 issue 是 bug 反馈
  • 本 bug 在最新版本中仍存在

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.