Giter Site home page Giter Site logo

application_checks error about nextcord HOT 3 OPEN

eeemoon avatar eeemoon commented on July 20, 2024 1
application_checks error

from nextcord.

Comments (3)

A1Asriel avatar A1Asriel commented on July 20, 2024

Same happens with nextcord.ext.commands.check_any() and nextcord.ext.commands.has_guild_permissions(). Most likely, the issue affects every permission check.

  • Code:
import nextcord
from nextcord.ext import commands

client = commands.Bot("test!", intents=nextcord.Intents.all())

@client.command()
@commands.check_any(commands.has_guild_permissions(manage_guild=True))
async def ping(ctx: commands.Context):
    return await ctx.send("Pong!")

client.run("TOKEN")
  • Traceback:
Traceback (most recent call last):
  File "c:\path\to\bot\main.py", line 8, in <module>
    @commands.check_any(commands.has_guild_permissions(manage_guild=True))
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\path\to\bot\.venv\Lib\site-packages\nextcord\ext\commands\core.py", line 1929, in check_any
    raise TypeError(f"{wrapped!r} must be wrapped by commands.check decorator") from None
TypeError: <function _permission_check_wrapper.<locals>.wrapper at 0x0000026C5B01D800> must be wrapped by commands.check decorator
  • System info: Python 3.11.8, Nextcord-3.0.0a25+g1c860268, aiohttp 3.9.3, Windows 11 22631.3155.

from nextcord.

ooliver1 avatar ooliver1 commented on July 20, 2024

This is not the same @A1Asriel, that is ext.commands.

from nextcord.

A1Asriel avatar A1Asriel commented on July 20, 2024

This is not the same @A1Asriel, that is ext.commands.

I understand, but even if it's in another module, it still produces the same error and is triggered by the same conditions. I can open another issue, if needed.

from nextcord.

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.