From 0d59a5220ff911990c831ed2a65c503f184c8932 Mon Sep 17 00:00:00 2001 From: bobloy Date: Fri, 5 Oct 2018 13:06:17 -0400 Subject: [PATCH] ctx.me instead of ctx.guild.me to work in dm's --- werewolf/builder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/werewolf/builder.py b/werewolf/builder.py index da0bf1e..4364cb1 100644 --- a/werewolf/builder.py +++ b/werewolf/builder.py @@ -190,7 +190,7 @@ async def encode(roles, rand_roles): async def next_group(ctx: commands.Context, pages: list, controls: dict, message: discord.Message, page: int, timeout: float, emoji: str): - perms = message.channel.permissions_for(ctx.guild.me) + perms = message.channel.permissions_for(ctx.me) if perms.manage_messages: # Can manage messages, so remove react try: await message.remove_reaction(emoji, ctx.author) @@ -210,7 +210,7 @@ async def next_group(ctx: commands.Context, pages: list, async def prev_group(ctx: commands.Context, pages: list, controls: dict, message: discord.Message, page: int, timeout: float, emoji: str): - perms = message.channel.permissions_for(ctx.guild.me) + perms = message.channel.permissions_for(ctx.me) if perms.manage_messages: # Can manage messages, so remove react try: await message.remove_reaction(emoji, ctx.author) @@ -295,7 +295,7 @@ class GameBuilder: async def list_roles(self, ctx: commands.Context, pages: list, controls: dict, message: discord.Message, page: int, timeout: float, emoji: str): - perms = message.channel.permissions_for(ctx.guild.me) + perms = message.channel.permissions_for(ctx.me) if perms.manage_messages: # Can manage messages, so remove react try: await message.remove_reaction(emoji, ctx.author) @@ -310,7 +310,7 @@ class GameBuilder: async def select_page(self, ctx: commands.Context, pages: list, controls: dict, message: discord.Message, page: int, timeout: float, emoji: str): - perms = message.channel.permissions_for(ctx.guild.me) + perms = message.channel.permissions_for(ctx.me) if perms.manage_messages: # Can manage messages, so remove react try: await message.remove_reaction(emoji, ctx.author)