Skip to content

Commit f0cc754

Browse files
committed
allow matching
1 parent da8f66e commit f0cc754

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

changelogs/3.11.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,16 @@ A bit of a smaller update while we ramp up for 4.0!
1515
- Use it like `stacked "<object name>" [user]`.
1616
- With no user provided, defaults to yourself.
1717
- Tells you how many of that object is needed to stack to equal your height.
18+
- Added a new command, `toggleallowmatching`.
19+
- Toggles whether or not to allow others to match your size.
20+
- Enables/disables `copyheight`, `outgrow`, and `outshrink`.
21+
- Is enabled by default.
1822
- Added a new command, `list`.
1923
- Currently only supports `list stats`, which will list all stats in the bot.
2024

25+
## Changes
26+
- `outgrow` and `outshrink` can now take a user argument.
27+
2128
## Fixes
2229
- The bot will now warn you if you've run an unrecognized command.
2330
- Improved error handling and reporting.

sizebot/cogs/multiplayer.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,20 @@ async def toggleallowothers(self, ctx: GuildContext):
221221
YOU HAVE BEEN WARNED."""
222222
await ctx.send(s)
223223

224+
@commands.command(
225+
category = "multiplayer"
226+
)
227+
@commands.guild_only()
228+
async def toggleallowmatching(self, ctx: GuildContext):
229+
"""Allow other users to match your size.
230+
"""
231+
userdata = userdb.load(ctx.guild.id, ctx.author.id)
232+
userdata.allow_matching = not userdata.allow_matching
233+
userdb.save(userdata)
234+
235+
s = f"Set allowing matching of your size to {userdata.allow_matching}."
236+
await ctx.send(s)
237+
224238

225239
async def setup(bot: commands.Bot):
226240
await bot.add_cog(MPCog(bot))

0 commit comments

Comments
 (0)