Skip to content

interaction_check and friends aren't typed as Coroutine[Any, Any, bool] #10354

@longnguyen2004

Description

@longnguyen2004

Summary

The function interaction_check and other related functions in Cog aren't typed as Coroutine[Any, Any, bool], preventing them from being async functions

Reproduction Steps

See example code

Minimal Reproducible Code

class Admin(commands.GroupCog):
    # this errors
    async def interaction_check(self, interaction: Interaction) -> bool:
        return True

Expected Results

No type error occurs

Actual Results

Type error occurs: Class member `Admin.interaction_check` overrides parent class `GroupCog` in an inconsistent manner

Intents

discord.Intents.default()

System Information

  • Python v3.13.1-final
  • discord.py v2.6.4-final
  • aiohttp v3.13.1
  • system info: Windows 11 10.0.26100

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis is a bug with the library.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions