-
-
Notifications
You must be signed in to change notification settings - Fork 257
Description
Description
I'll preface this by saying that the command name is subject to change, I don't like the current one (avatarmod) a great deal, but I can't currently think of a better name. Essentially the command would do similar transformations to current commands like spookify, and other commands that play with the avatar image, but in a more convenient way.
Reasoning
It would mean that all avatar imagery stuff was in one place, which would make it easy to just add a new transformation function without needing a whole new cog or command, instead, you only need to worry about implementing the actual logic, which should make it easier for people to develop new cool avatar transformations.
Proposed Implementation
As opposed to the current system where there's an ever-growing list of new commands for each avatar operation, this would instead have two commands:
avatarmod [*options]- This would apply the given options to the image, for example,
.avatarmod flip invertwould flip the image vertically (horizontal is mirror), then take that flipped image and invert it, then return the image. This would of course need to be limited to a set number of operations you could perform on one thing to stop people from doing 10 image operations taking a long time.
- This would apply the given options to the image, for example,
avatarmod list- This would list the available operations that could be performed on the avatars.
The way this would work is that there'd be a base cog with the commands that essentially just acts as an interface - showing available options and communicating with helper functions, which brings me to the implementation of the actual feature. To create a new transformation of some sort you define a function that takes a PIL.Image.Image and returns a PIL.Image.Image, which is run in an executor by the avatarmod command function.
Would you like to implement this yourself?
- I'd like to implement this feature myself
- Anyone can implement this feature