Skip to content

Commit

Permalink
🐛 Fix: 修复频道权限类型不匹配问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mobyw committed Oct 2, 2023
1 parent 405e941 commit 74f7e8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nonebot/adapters/qq/permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
async def _guild_channel_admin(
event: Union[AtMessageCreateEvent, MessageCreateEvent]
) -> bool:
return 5 in getattr(event.member, "roles", ())
return "5" in getattr(event.member, "roles", ())


async def _guild_admin(event: Union[AtMessageCreateEvent, MessageCreateEvent]) -> bool:
return 2 in getattr(event.member, "roles", ())
return "2" in getattr(event.member, "roles", ())


async def _guild_owner(event: Union[AtMessageCreateEvent, MessageCreateEvent]) -> bool:
return 4 in getattr(event.member, "roles", ())
return "4" in getattr(event.member, "roles", ())


GUILD_CHANNEL_ADMIN: Permission = Permission(_guild_channel_admin)
Expand Down

0 comments on commit 74f7e8e

Please sign in to comment.