diff options
| author | 2021-05-10 09:30:46 -0400 | |
|---|---|---|
| committer | 2021-05-10 09:30:46 -0400 | |
| commit | 52aa6dcd499fc3e757a226c1192755888a6d88ef (patch) | |
| tree | cdc69a9a5804e8b590a82055b2b500d8c09016a3 /bot | |
| parent | chore: Apply more suggested changes (diff) | |
chore: ctx.message.author -> ctx.author
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/exts/easter/bunny_name_generator.py | 2 | ||||
| -rw-r--r-- | bot/exts/evergreen/snakes/_snakes_cog.py | 6 | ||||
| -rw-r--r-- | bot/exts/halloween/monsterbio.py | 2 | ||||
| -rw-r--r-- | bot/exts/internal_eval/_internal_eval.py | 2 | 
4 files changed, 6 insertions, 6 deletions
| diff --git a/bot/exts/easter/bunny_name_generator.py b/bot/exts/easter/bunny_name_generator.py index b6523ff6..5e3b014d 100644 --- a/bot/exts/easter/bunny_name_generator.py +++ b/bot/exts/easter/bunny_name_generator.py @@ -62,7 +62,7 @@ class BunnyNameGenerator(commands.Cog):      @commands.command()      async def bunnifyme(self, ctx: commands.Context) -> None:          """Gets your Discord username and bunnifies it.""" -        username = ctx.message.author.display_name +        username = ctx.author.display_name          # If name contains spaces or other separators, get the individual words to randomly bunnify          spaces_in_name = self.find_separators(username) diff --git a/bot/exts/evergreen/snakes/_snakes_cog.py b/bot/exts/evergreen/snakes/_snakes_cog.py index 6278c883..b844960a 100644 --- a/bot/exts/evergreen/snakes/_snakes_cog.py +++ b/bot/exts/evergreen/snakes/_snakes_cog.py @@ -746,7 +746,7 @@ class Snakes(Cog):          my_snake_embed = Embed(description=":tada: Congrats! You hatched: **{0}**".format(snake_name))          my_snake_embed.set_thumbnail(url=snake_image)          my_snake_embed.set_footer( -            text=" Owner: {0}#{1}".format(ctx.message.author.name, ctx.message.author.discriminator) +            text=" Owner: {0}#{1}".format(ctx.author.name, ctx.author.discriminator)          )          await ctx.send(embed=my_snake_embed) @@ -1046,14 +1046,14 @@ class Snakes(Cog):          """          with ctx.typing():              embed = Embed() -            user = ctx.message.author +            user = ctx.author              if not message:                  # Get a random message from the users history                  messages = []                  async for message in ctx.channel.history(limit=500).filter( -                        lambda msg: msg.author == ctx.message.author  # Message was sent by author. +                        lambda msg: msg.author == ctx.author  # Message was sent by author.                  ):                      messages.append(message.content) diff --git a/bot/exts/halloween/monsterbio.py b/bot/exts/halloween/monsterbio.py index dbafa43f..1aaba7bb 100644 --- a/bot/exts/halloween/monsterbio.py +++ b/bot/exts/halloween/monsterbio.py @@ -26,7 +26,7 @@ class MonsterBio(commands.Cog):      @commands.command(brief="Sends your monster bio!")      async def monsterbio(self, ctx: commands.Context) -> None:          """Sends a description of a monster.""" -        seeded_random = random.Random(ctx.message.author.id)  # Seed a local Random instance rather than the system one +        seeded_random = random.Random(ctx.author.id)  # Seed a local Random instance rather than the system one          name = self.generate_name(seeded_random)          species = self.generate_name(seeded_random) diff --git a/bot/exts/internal_eval/_internal_eval.py b/bot/exts/internal_eval/_internal_eval.py index 4fe3bc09..56bf5add 100644 --- a/bot/exts/internal_eval/_internal_eval.py +++ b/bot/exts/internal_eval/_internal_eval.py @@ -114,7 +114,7 @@ class InternalEval(commands.Cog):          """Evaluate the `code` in the current evaluation context."""          context_vars = {              "message": ctx.message, -            "author": ctx.message.author, +            "author": ctx.author,              "channel": ctx.channel,              "guild": ctx.guild,              "ctx": ctx, | 
