Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roleplay - mention multiple users #53

Open
Sandvich opened this issue Jan 21, 2021 · 2 comments
Open

Roleplay - mention multiple users #53

Sandvich opened this issue Jan 21, 2021 · 2 comments

Comments

@Sandvich
Copy link
Contributor

Hi!

I think it'd be great to be able to mention multiple users in the roleplay commands without Red complaining that multiple users aren't a single user :p

I can code this myself, in theory, but I've not done any RedBot dev before. So I could do with a little bit of clarification, if that's okay?
To take the cuddle command as an example:

    @commands.command()
    @commands.bot_has_permissions(embed_links=True)
    async def cuddle(self, ctx, *, user: discord.Member):
        """Cuddles a user!"""

        author = ctx.message.author
        images = await self.config.cuddle()
   -snip-

I'm guessing the , user: discord.Member will ensure that only a single member is returned, but if I were to remove that type annotation, would it give me a string that I can then convert to multiple members? Is there another approach that you can suggest?

I might also look into removing some of the duplicate code in that file, there's a fair bit of it. But that's probably a thought for another day :)

@lionirdeadman
Copy link
Member

That would be cool, for sure. I think from a design perspective, it should have a way to classify how many people are present in a picture to give an accurate picture based on the amount of people are mentioned. 🤔

I don't think much of the duplicate code can be removed because of how Red handles commands.

@Sandvich
Copy link
Contributor Author

See, I thought about that initially, but I concluded that it wasn't worth the effort because the rotation of gifs for any given command would become a bit too small, I think. Maybe if we found a bunch more gifs it'd be worth doing though :)

As for duplication, I think potentially a decorator would allow us to do that. But I must confess, I've got little experience with decorators. Still, it's worth a try imo ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants