Skip to content

Allow the sf command to take more than one snowflake at the time#1455

Merged
Akarys42 merged 3 commits into
masterfrom
many-snowflakes
Mar 12, 2021
Merged

Allow the sf command to take more than one snowflake at the time#1455
Akarys42 merged 3 commits into
masterfrom
many-snowflakes

Conversation

@Akarys42
Copy link
Copy Markdown
Contributor

@Akarys42 Akarys42 commented Mar 8, 2021

Here is how it looks with many snowflakes:

image

To avoid users making the bot hit ratelimits, it is still limited to one snowflake per invocation for non-staffers

image

@Akarys42 Akarys42 added p: 2 - normal Normal Priority a: utility Related to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils) t: enhancement Changes or improvements to existing features labels Mar 8, 2021
@Akarys42 Akarys42 requested a review from ks129 as a code owner March 8, 2021 16:33
Comment thread bot/exts/utils/utils.py
)
await ctx.send(embed=embed)
if len(snowflakes) > 1 and await has_no_roles_check(ctx, *STAFF_ROLES):
raise BadArgument("Cannot process more than one snowflake in one invocation.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention here that this is only case if user is not staff member.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably not necessary. We can let the staff know that or alternatively add it to the help section of the command.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think it is necessary, we don’t mention that only moderators can use !user on other users than themselves. I don’t mind adding it to the docstring but I feel like that will just add noise since the new command signature will reflect this change, what do you think?

@Akarys42 Akarys42 requested review from jb3 and ks129 March 12, 2021 07:58
@Akarys42 Akarys42 merged commit 7f531a0 into master Mar 12, 2021
@Akarys42 Akarys42 deleted the many-snowflakes branch March 12, 2021 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: utility Related to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils) p: 2 - normal Normal Priority t: enhancement Changes or improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants