Index
The "set" commands allow you to, as the name implies, set (and modify) almost every setting a transformed user has. For now, most of these settings, excluding the biography, are speech modifiers that alter their messages, in one way or another.
The "clear" commands, on the other hand, allow you to clear the settings the user has, individually or all at once.
Warning
Remember that there's no undo button for these commands; clearing a setting will mean that you'll have to set it up again if you decide it was something you wanted.
Info
All clear commands follow the same structure:
/clear [modifier] <user> <word>
where the modifier is the same keyword used
by the respective set command. User can always be specified, but the word
field can only be specified when the modifier takes a word as an input,
i.e., prefix, suffix, muffle, sprinkle, censor...
Warning
Not providing a word value when executing a clear command that accepts it
will result in the removal of ALL modifiers of that class, i.e., if a user
has seven sprinkles set, and you use /clear sprinkle <user>
, without the
word parameter, all seven will be removed from the user. Exercise caution.
For consistency, all chance values default to 30% if unspecified, for every set command listed here.
Info
Clears the entirety of a user's configuration (except claims), effectively undoing any previous set commands.
Warning
We recommend you save a transformation before clearing all the settings of a user. That will reduce the chance of you regretting it later.
Info
Sets a prefix string that will go before the message the user has sent, with a certain random chance of this happening.
Info
Sets a suffix string that will go after the message the user has sent, with a certain random chance of this happening.
Info
Makes all the text the user writes big.
Info
Makes all the text the user writes small.
Info
"Hushes" the user, that is to say, makes it into a spoiler, effectively emulating the user being unable to speak, but maintaining a certain level of mutual understanding through the underlying text.
Info
Makes the user's text be inverted completely.
Info
Note
Requires the user to have been claimed by another user.
"Eternally" transforms a user, that is to say, makes the user unable to modify themselves or be modified by anyone that isn't the user that claimed them.
Info
"Censors" a word, by replacing it with whatever replacement you choose every time the user tries to say it.
Info
Randomly sprinkles a word in between whatever the user says, without replacing any other words.
Info
"Muffles" a message, effectively replacing random words with whatever you choose, or, if the alternative mode is on, it will substitute entire messages.
Info
Makes the user stutter. T-this makes t-them talk in a s-similar manner to t-this.
Info
Sets the user's biography, which, at the moment, is mainly used to describe saved characters to others in an easy manner, though it can be used to list any kind of information, like limits, kinks, information, etc.
The extract_tf_data
function
This function is used in all /set
and /clear
commands, so it is only fair to
explain it here. If you don't want the technical ramble and logic explanation, you
may skip this section with no problems.
This function is located inside the utils.py
file, and serves as a utility for
all of these functions, because they all need to do the same checks and require
variations of the same data.
The function signature contains four variables, ctx
, representing the Discord
environment provided by the API and PyCord, user
, representing the Discord User
whose data we want to extract, get_command
, which is a boolean stating whether
the origin of the request is a /get
command, and channel
, which refers to a
Discord Channel to extract the data at (currently unused, in practice).
The function returns a boolean, indicating whether a user is a valid target or not, the data of said user, and, finally, the user. The simplified logic diagram is shown here.
Any time the function is used, the pertinent command checks if the user is valid or not (so, whether the first return argument is True), and this step will be omitted in future logic trees, to avoid unnecessary clutter.
flowchart TD
CheckUser[user is None]
CheckUser --> |True| AssignUser[[user == ctx.user]]
CheckUser --> |False| CheckTransformed[[Check if the user is transformed]]
AssignUser --> CheckTransformed
CheckTransformed --> |Not Transformed| SendAnswerError[[Send answer, operation failed]]
CheckTransformed --> |Transformed| LoadData[[Load data]]
Database[(Database)] --> LoadData
LoadData -->CheckClaim[Is user claimed by another user and get_command == False?]
CheckClaim --> |Yes| SendAnswerError
CheckClaim --> |No| ReturnData[[Returns True, data, and the user]]
SendAnswerError --> ReturnNone[[Returns False, None, and None]]
Simplified internal logic of /clear
commands
All the /clear
commands (except /clear all_fields
, which has its own article),
follow more-or-less the same logic as their /set
counterparts, but instead of
adding the modifier, they clear it (and they don't apply any extra string
modifications, ike the affixes adding whitespace). Due to this, simplified logic
sections and diagrams won't be specifically added (at this point, at least) for
these commands.