Giter VIP home page Giter VIP logo

Comments (7)

SunshineboyZj avatar SunshineboyZj commented on July 30, 2024

兔兔v6.0.12,go-cqhttp v1.0.0rc4

from amiya-bot.

Initial-heart-1 avatar Initial-heart-1 commented on July 30, 2024

@vivien8261

from amiya-bot.

vivien8261 avatar vivien8261 commented on July 30, 2024

未能复现该问题

from amiya-bot.

hsyhhssyy avatar hsyhhssyy commented on July 30, 2024

能看一下你的其他插件都装了什么吗?兔兔互动功能有很多插件都会参与修改,有可能是其他插件和他有冲突或者干扰。

from amiya-bot.

SunshineboyZj avatar SunshineboyZj commented on July 30, 2024

能看一下你的其他插件都装了什么吗?兔兔互动功能有很多插件都会参与修改,有可能是其他插件和他有冲突或者干扰。

刚刚在没装插件的情况下试了下,还是会出现这个问题(控制台管理员添加了我,我在不是管理的群里控制不了兔兔上下班)。装了“词语替换”才好,跟上传的图片视频中情况类似。
说来也奇怪,我服务器上遇到了不少奇奇怪怪的问题(包括但不限于这件事,2016及以上系统兔兔装插件时会报SSL错误装不上),也不知道是咋回事。。。摆烂了,虽然有点小问题,但也不是不能用(

from amiya-bot.

hsyhhssyy avatar hsyhhssyy commented on July 30, 2024

该异常已被定位:
amiyabot-replace的插件代码中,对is_admin进行了复写,如下所示:

@bot.handler_middleware
async def _(data: Message):
    replace: List[TextReplace] = TextReplace.select() \
        .where(TextReplace.group_id == data.guild_id, TextReplace.is_active == 1) \
        .orwhere(TextReplace.is_global == 1)

    if not data.is_admin:
        data.is_admin = bool(Admin.get_or_none(account=data.user_id))

在Core中的三个adapter都没有读取数据库(因为读不了)
Amiyabot中也没有读取这个Admin数据库

因此只有安装了词语替换才能使得后台中的管理员账户生效。

建议将该插件的midware移动到amiyabot项目中。

from amiya-bot.

vivien8261 avatar vivien8261 commented on July 30, 2024

该异常已被定位: amiyabot-replace的插件代码中,对is_admin进行了复写,如下所示:

@bot.handler_middleware
async def _(data: Message):
    replace: List[TextReplace] = TextReplace.select() \
        .where(TextReplace.group_id == data.guild_id, TextReplace.is_active == 1) \
        .orwhere(TextReplace.is_global == 1)

    if not data.is_admin:
        data.is_admin = bool(Admin.get_or_none(account=data.user_id))

在Core中的三个adapter都没有读取数据库(因为读不了) Amiyabot中也没有读取这个Admin数据库

因此只有安装了词语替换才能使得后台中的管理员账户生效。

建议将该插件的midware移动到amiyabot项目中。

确实……核心库的消息生命周期改名之后修复这个问题

from amiya-bot.

Related Issues (20)

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.