Skip to content

Commit

Permalink
Update version number and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
tandemdude committed May 5, 2021
1 parent e5a3e43 commit 7509cbb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ If you think anything is missing, make a merge request to add it, or contact tho

----

Version 0.0.60
==============

- Added :obj:`~lightbulb.events.LightbulbEvent.bot` property

- Fixed admin permission checks not working as expected

Version 0.0.59
==============

Expand Down
2 changes: 1 addition & 1 deletion lightbulb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
*events.__all__,
]

__version__ = "0.0.59"
__version__ = "0.0.60"
4 changes: 4 additions & 0 deletions lightbulb/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ async def _bot_has_guild_permissions(ctx: context.Context, *, permissions: hikar

await _guild_only(ctx)

if ctx.guild.owner_id == ctx.bot.cache.get_me().id:
return True

roles = ctx.bot.cache.get_roles_view_for_guild(ctx.guild_id).values()
bot_member = ctx.bot.cache.get_member(ctx.guild_id, ctx.bot.cache.get_me().id)

missing_perms = _get_missing_perms(permissions, [role for role in roles if role.id in bot_member.role_ids])

if missing_perms:
Expand Down

0 comments on commit 7509cbb

Please sign in to comment.