Jintaku-Cogs-V3 icon indicating copy to clipboard operation
Jintaku-Cogs-V3 copied to clipboard

Roleplay - mention multiple users

Open Sandvich opened this issue 4 years ago • 2 comments

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 :)

Sandvich avatar Jan 21 '21 12:01 Sandvich

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. :thinking:

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

lionirdeadman avatar Jan 22 '21 02:01 lionirdeadman

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 ^^

Sandvich avatar Jan 22 '21 17:01 Sandvich