+tag [Old User]

"lets me store and recall messages, image links or custom scripts"

Permission: [Old User] Caller must either have been a member of the server for 15 minutes or have a role with more permissions than @everyone.

Tags are like bookmarks. You can create them and then later recall them.
This could be for images or even custom scripts

Tags are stored per server. To use one server's tag on another server, you should use the pull, clone or import commands to copy the tag.


Help commands

There are currently 5 help commands in discord that explain how to use tags, so uh, if the length of the contents didn't give it away already, that should. These commands are:

  • +help tag General editing commands.
  • +help taginfo Searching and info tools.
  • +help tagmovement Moving tags between servers.
  • +help tagyna Tools for scripting tags.
  • +help tagconfig Different config options.

Recalling Tags

Every tag will have a name, which is unique on your server. To recall a tag, you can just use that name.

+tag 'name' ['args' ...]
Name is the tag to fetch.
Args is a list of args to pass to the tag. Only useful for tags that utilise yna.
 

You may have noticed some tags seem to be personalised, or always change when you use them. These are yna script tags. To see what the real content of one of these tags are, you can use the raw command.

+tag raw 'name'
Name is the tag to fetch the raw content of.

Tags marked as closed cannot be posted this way unless you own the tag


General Editing

This section will describe how to create and edit tags, and how to delete them too.

Creating tags

To create a tag, you have 3 options:

+tag create 'name' 'content'
This allows you to create a tag within a single message by pasting your content.
Name is the tags name, Content is the tags content.
I will also send a warning if it looks like you may have forgotten some quotes.
+tag create 'name'
This starts a prompt that accepts the entire content of your next message (without quotes) as the tag's content.
Name is the tags name.
You can also upload files into the content prompt
Ah yes 42, thank you for reminding me.
You can upload images and yna scripts, though I highly suggest rehosting images to imgur instead of using direct uploads.
+tag create 'name' With upload
This uses the uploaded file as the tag content.
Name is the tags name.
If the upload is in the .yna format, the contents of the file will be read and used as the tag.
If the upload is in any other format, the discordcdn link will be stored.

Initialisation Code

If your tags use state variables you can initialise those when you create a tag.
To do this, you should add {init} Your init code here {endinit} to your tag content.


Editing tags

After a tag is created, you can edit it later. Or rather, you and moderators can edit your tag. There are 2 different kinds of edits you can make for a tag, and yes, you can upload yna files for both.

+tag edit 'name' 'new content'
Completely replaces the content of a tag.
Name is the tag to edit, new content is the content to use.
New content can be replaced with a yna file upload.

Extending tags

You can append content to specific places in a tag. By default this is the end, but you can add new insertion points into your tag manually.

To add an insertion point, you use this syntax:
{!!extend id pre="\n" post="" yna=false public=true}
Only the ID is required and it must be fully lowercase with no numbers or special characters.
The rest of the parameters are optional, but must be in the correct order. pre/post will work but post/pre will not.
The yna parameter says whether yna code insertion should be allowed. If this is false (recomended for public insertion points) then {, }, ; and \ characters will be escaped.
The public parameter says whether the insertion point can be used by general members. If a tag is not marked with the Public flag, then the tag cannot be extended by general members regardless.

You may add a trailing ! to the marker. This is to accomodate for editors that highlight comments between {! and !}

If there is not a marker with the id "end", then a default insertion point is placed at the end of the tag with the same parameters as the example

{oneline:
{choose:
  foo;
  bar; {!Lets add the first extension point here.}
  baz{!!extend choice pre=";\n" public=true}
;}
{!We need to disable the default IP}
{!!extend end public=false}
{!Now users can use "+tag extend 'name' 'content' choice"}
;}
+tag extend 'name' 'content' ['location']
Inserts content into a tag.
Name is the tag to edit, content is the content to append.
Location is the place to insert the new content. If no location is given, it will be placed either at the end of the tag, or at the insertion point named "end".

Renaming tags

Tags can also be renamed by their maker, the moderators and in extremely rare cases*, squas.

*This only happens when a new subcommand is added that otherwise clashes with existing tag names. When this happens, your tag will be renamed to have a single underscore after. Example: +tag config -> +tag config_
+tag rename 'name' 'new name'
Renames a tag.
Name is the tag to rename, new name is the new name for the tag.

Deleting tags

This command deletes a single tag.
Bot mods on a server can delete any tag they wish regardless of who owns it.
For deleting multiple tags, check the Delete all command.
Side note: Anyone can delete orphaned tags regardless of who the actual owner is, or rather, was.

+tag delete 'name'
Name is the tag to delete

Tag Information

This section will describe different ways of searching for tags and getting information about those tags.

Searching for tags

This command lets you search for tags by name.
If a single tag is found, it's posted immediately, otherwise a list of the tags that were found is posted.
Technical note: This command is a substring search. i.e. "apple" will match "apple crumble" but not "apfel".

+tag search 'query'
query is the thing to search for.

Random tags

This command picks any random tags from the server.
Notes: Tags marked as NSFW or Spoilers will not be brought up in random.

+tag random ['query']
If query is supplied, it will post a random tag from the list of tags who's name contains the query.

Tag information

Info shows a lot of content about a tag. This includes:

  • A tags {!!description}
  • Whether it is generic
  • Who owns the tag, or if its orphaned
  • The amount of uses
  • When it was created
  • What metadata is has
  • If it's been cloned
  • If it has state variables
+tag info 'name'
Name is the tag to get info for

Tag listing

You can view all the tags you own on a server. This is printed as a paginated embed.

+tag list ['user']
If a user is supplied, it will list their tags instead.

The left and right arrows navigate the pages, while the up arrow takes you to a guild overview. Here, you can see your total tag count, as well as which servers have the most tags, and how many tags you've left on orphaned and dead servers.

Listing all guild tags

You can also view a list of every tag on the server. These are sent as files containing 500 tags at a time.

+tag list all

Each line represents a tag, the bar on the left displays what metadata that tag uses.

Then it just puts the tag's owner and its name.


Tag statistics

This command posts a bunch of statistics about your guild's tags.
This command uses the paginated embeds from +info

  • Guild tag count
  • Total tag uses
  • World standings
  • Metadata totals (NSFW, spoiler, hidden)
  • yna tags
  • The newest tag
  • The users with the most tags here
  • The tags with the most uses
+tag stats

Ownership and Movement

As a general rule, tags have an owner and exist only on one server. There are some commands here that allow for easy copying of tags between servers.

Changing owners

There are 2 steps to changing the owner of a tag. Firstly, the current owner needs to request to give it away, then the proposed new owner must accept the tag.

+tag gift 'name' 'user'
Requests a transfer.
Name is the tag to transfer, user is the person to give the tag to.
+accept 'name'
This requires a request to have been made and will time out after a while.
Name is the tag to take ownership of.

Claiming orphaned tags

Orphaned tags are tags that are currently owned by someone who has left the server.
If the owner joins the server again, they will automagically be given ownership of their tags. Oh and by "automagically", I mean they never actually lost ownership.
However, if the owner isn't going to come back, or you want to take the tag anyway, you can claim ownership yourself.

+tag claim 'name'
Name is the name of the tag to take

Another important note about the claim command: If you know a generic tag and there is no tag on the server with the same name as the generic tag, you can claim the generic tag to make a copy of it to your server.


Moving tags between servers

Tags are created and exclusively usable inside your server, however you may want to copy some tags into other servers. You could do this by getting the raw content and then recreating the tag on the other server, but 42 has tools to directly copy tags to other servers.

+tag clone 'name' 'guild' ['new name']
Copies a tag from your server into another one.
Name is the tag to copy, guild is where to copy it to.
If new name is given, it'll use that to create the tag on the new server. Useful for if the tags name is already taken
+tag pull 'name' 'guild' ['new name']
Copies a tag from another server into your server.
Name is the tag from the other server you want to copy, guild is the server to copy from.
If new name is given, the tag created on your server will use that name. Useful for if the name given to the tag on the other server is already taken here.

Exporting collections of tags

If you need to copy a lot of tags at once, you can use export files.

Notes: You can only export your own tags, and the tags must exist on the source server before they can be copied.

To import a bunch of tags to a server at the same time, you need to first get a file using +tag export the upload the file you get with the caption +tag import

+tag export
Produces an export file.

The file has 2 sections, the headers and the content.
Here are the headers.

1 │ --DO NOT DELETE THIS LINE--
2 │ source guild, 1234
3 │ on conflict, ignore
4 │ on general error, ignore
5 │ on state error, ignore
6 │ import nsfw, 0
7 │ import spoiler, 0
8 │ --List of fields for each tag--

Line 2 is the ID of the source server, you probably shouldn't change this.

Line 3 is what to do when a name conflict happens. This can take 1 of 4 values

  • ignore This will just skip tags that have conflicting names
  • rename This will append an underscore to tags with conflicting names
  • update/ignore If you own the conflicting tag, the tag from the file will replace the one on the server, otherwise the tag will be ignored.
  • update/rename If you own the conflicting tag, the tag from the file will replace the one on the server, otherwise the tag will be appended with an underscore.

Line 4 states what to do when there is a problem reading a tag. This one has 2 values

  • ignore This will skip the broken tag.
  • stop This will halt the import and alert the user about a broken tag.

Line 5 says what to do when there is an issue with a tags state variables.

  • ignore This will skip the broken tag.
  • delete This will erase the offending variable(s)
  • delete all This will erase all of the state variables
  • stop This will halt the import and alert the user about a broken tag.

Line 6 states whether NSFW tags should be imported. 1 for yes, 0 for no.

Line 7 states whether spoiler tags should be imported. 1 for yes, 0 for no.

 

Here is a tag

8 │ Tag name, New name, NSFW, Public, Hidden, Restricted, Closed, Spoiler, State:Var
9 │ help, tag, 0, 0, 0, 0, 0, 1, 0, last:create, lastusr:squaswin

Each tag is 1 line in the file.

Line 8 shows what each value is.

Tag name: This is the name of the tag from the source server. This should not be changed.

New name: This is what you want the tag to be called when you import it.

7 Metadata values. These are 0 for off or 1 for on.

State Variables: These are the up to 16 state variables on a tag. The variable name is the content before the colon, the value is the content after.

If you do decide to edit your file, the things you probably need to care about:
To import NSFW or Spoiler tag, change the 0 to 1 next to "import nsfw" and "import spoilers"
To remove a tag from your import file, just find the line where the name is and delete that line.
To rename a tag before you import it, find the tag's line and change the second name on that line to your new name.

+tag import With upload
Reads a export file in and copies the tags into the server.

Mass Deletion of Tags

Oh and xdelete is here too

So you or one of your members has just imported a load of garbage, or you are starting to run out of slots for tags. 42 provides tools for deleting a lot of tags all at once.
42 also provides a way of covertly deleting a tag from another server when, say (and this has legitimately happened), someone clones an obviously NSFW tag onto a clearly SFW server.


Deleting tags from other servers

If you want to delete a tag from a server without that server knowing it was deleted or that it even existed, you can do so.
No notice is sent to the target server about this action.

+tag xdelete 'guild' 'name'
Guild is the server to delete the tag from, name is the tag to delete.

The delete all command lets you delete every tag you own on that server, or instead, you can add a filter to it to change what is deleted.
There are different filters for users and staff.

+tag delete all
This deletes every tag you own on the server the command is used.

User tools

Firstly, a couple of definitions.
Orphaned tags are tags from a guild that you are no longer on. They are still "your" tags, but they are open to be claimed by other users.
Dead tags are tags from a guild that 42 is no longer on. They still exist for if 42 rejoins the server, but are otherwise unusable.

Note: Tags must exist on the server to be imported.

Okay, that out of the way? Let me tell you about 42's functions.

+tag delete all orphaned
This deletes every tag that you have left orphaned on other servers.
+tag delete all dead
This deletes residual tags from guilds 42 is no longer on.
+tag delete all on 'guild'
This deletes all the tags from a given server. The server will not be alerted.
Guild is the name or ID of the server to delete the tags from.

s-squas, please don't tell them about the next one...

I'm sorry 42, but in the name of completeness, I must.

B-but it's such a dangerous command!

I know 42, I'm sorry.

+tag delete al--
A-are you sure about this squas?
Yes 42. Please just let me write the docs....
+tag delete all everywhere
This deletes EVERY SINGLE TAG THAT YOU OWN.
In the process, it invalidates every single export file you have.

Server tools

There are a couple tools that server moderators can do to help clean up or stop problem users.

Do not forget though, that you can also botban problem users.

+tag delete all orphans
(Not to be confused with "orphaned")
This deletes all tags from the server where the tag's owner has left the server.
+tag delete all from 'user'
This deletes all tags owned by a single user on the server.
User is the person who's tags will be deleted.

Metadata Flags

Each tag can have an optional set of metadata flags that do different things.
There are 7, and yes, tags can have all 7 at once.
Mods can change any metadata about a tag for any reason with 2 exceptions

  • Mods cannot edit synced tags
  • Mods cannot attempt to sync tags

However, mods can break synced groups.

For all commands listed below, the command acts as a toggle.
e.g. using +tag nsfw on a tag that is already NSFW will remove the NSFW flag from the tag.

Spoilers

Spoilers serve 2 purposes.

  • Spoiler tags are removed from +tag random.
  • If spoiler rooms are defined, spoiler tags cannot be used outside those rooms.
+tag spoiler 'name'
Name is the tag to mark as spoilers.

NSFW tags

This is similar to spoilers, but provides a couple of key differences.

  • NSFW tags are removed from +tag random.
  • NSFW tags can only be used in marked NSFW channels
  • If the server has no NSFW channels, tags can be used anywhere, and this command only removes them from random.

The last point makes this a useful tool for if your SFW server defines spoiler rooms.

+tag nsfw 'name'
Name is the tag to mark as NSFW.

Movement Restricted Tags

Restricted tags cannot be cloned to or pulled from another server by anyone that isnt the tag's owner

+tag restrict 'name'
Name is the tag to restrict.

Closed source tags

Tags marked as closed source prevent users from viewing the raw content with the raw command.
The owner and mods can still get the raw content.

+tag closed 'name'
Name is the tag to make closed source.

Publicly extendable tags

Making a tag public allows the tag to be used in several ways.
Firstly, any member of the server to use extend on any public insertion points inside the tag.
This would be useful for things like easy bug reporting, suggestions, or adding new things to {choose} objects.
The second thing is that public tags can be used by anyone inside {call} objects, which makes it very useful for library tags.

+tag public 'name'
Name is the tag to make public.

Deleting the call commands.

Marking a tag as hidden means that when you call the tag, the command used to call it will be deleted if 42 has the ability to do so.
Moderators have the option to completely disable the ability to use this command.

+tag hidden 'name'
Name is the tag to delete calls for.

Syncing changes across servers

Syncing is the process of combining a set of tags into a group that get edited all at the same time.
Synced groups consist of a set of tags which are owned by the same person and has exactly the same content.

Moderators cannot create sync groups for other users, nor can they edit tags that are part of a sync group.
However, they can break a group in order to regain editing powers over the tags.

As syncing only covers identical tags, you can create a tag that does not enter a group by adding a yna comment to the tag, for example {! no sync/1 }

When you create a sync group, 42 will gather all the metadata sets of each tag in the proposed group and will give you a prompt to choose which metadata to use. This will probably be a number between 0 and 127.

+tag sync 'name'
Name is the tag to sync.

yna Scripting Tools

Tags employ a custom scripting language called Yonni na. This is pronunced however the frick you want, I just say "yna" as 3 letters, some people pronunce it "yona", I've even heard people calling it "nya"... Distractions aside, this section is for listing the tools to aid yna tag creation.

Running tags without saving

The eval command lets you run your tag and see the output before you actually create a tag.
This command is the equivalent to using

+tag create anonymous 'content'
+tag anonymous ['args']
+tag delete anonymous
+tag eval 'content' ['args' ...]
Content is the content to evaluate. This could also be a file upload.
Args is the list of args passed into the tag.

Debugging yna scripts

Sometimes just viewing the output of a script isn't enough to find whats going wrong. This command helps with debugging by posting a file containing details about every object that gets executed in the tag.

+tag debug 'name' ['args' ...]
Name is the tag to debug, args is the optional list of args.

Debugging tags without saving

If you need to debug some content, but haven't created an actual tag yet, this command is a combination of debug and eval, aptly named "deval".
Like in eval, the tag's name will be set to "anonymous" for the sake of the {tag} object.

+tag deval 'content' ['args' ...]
Content is the content to debug. This could also be a file upload.
Args is the list of args passed into the tag.

Resetting a tag's state variables

When you create a tag, an initilisation block will run and it will store the output as the tag's default state.
This command provides a way of reverting a tag's state back to what it was when it was created.

+tag reset 'name'
Resets a tag to it's stored defaults.
Name is the tag to reset.
+tag reload 'name'
Updates a tag's defaults using the init code in the tag.
Useful for when a tag was edited.
This also resets it too.
Name is the tag to reload.

Configuration Options

If you are a mod on a server, 42 supplies a whole load of options for how people can use tags.
All limitations are ignored by moderators, but each section will explain exactly whats happening.

Configs can be checked by using the command with no args.

+tag config
Views the current config.

Defining usage channels

You can lock tags such that they are only able to be used inside a specific set of channels. If no usage rooms are defined, tags can be used anywhere.
Note: Defined spoilerrooms are usagerooms by default if any usage rooms are defined.

Mods are not affected by usagerooms.

+tag config usagerooms '#channel' ['#channel' ...]
#channel is a set of channel mentions.
You need to define all your usagerooms at once, because this command overwrites your existing channels.
+tag config usagerooms clear
Removes the usageroom restriction.

Defining spoiler channels

You can lock tags marked with spoiler flags to specified channels.
If you have defined usageroome then tags will also be usable inside spoilerrooms regardless of if they are usagerooms.

If spoilerrooms are defined, mods can't use spoiler tags outside of the channels, so it would be worth adding the staff channel as a spoilerroom.

+tag config spoilerrooms '#channel' ['#channel' ...]
#channel is a set of channel mentions.
You need to define all your spoilerrooms at once, because this command overwrites your existing channels.
+tag config spoilerrooms clear
Removes spoilerroom restriction.

Limiting creation of tags

42 provides a way to limit how many tags a user can create (or rather own) on your server. This is seperate from their regular 5000 tag limit.
You can also completely disallow regular users to create tags.
Mods are unaffected by these limits.

+tag config allow_creation
Toggles whether regular users can create tags.
This also prevents regular users from using +tag eval.
+tag config creation_limit 'count'
Count is the amount of tags a user can own.
If they excede this value either through creating, cloning or claiming, they will no longer be able to create tags.
+tag config creation_limit 0
Removes the limit.

Preventing the use of the hidden modifier

A lot of servers dislike using the hidden flag on tags because it makes it harder to track who the spammers are. This allows servers to disallow regular users to set the flag.
Mods are unaffected by this.

+tag config allow_hidden
Toggles whether users can use the hidden command.

Limiting usage via coins cost.

42 has a internal coins system in which users can get 300* coins a day. What this setting allows you to do is to have 42 charge up to 30 coins for a user to use a tag.
Do remember that coins are global per user, so if multiple guilds use this limit, their tag usage will be limited between all of those guilds.

Mods are unaffected by this cost. Conversly, tags owned by mods will not charge users to use.

Patreon supporters will gain 1500 coins a day instead of 300.

+tag config coins_cost 'value'
Value is the cost from 1 to 30 coins.
+tag config coins_cost 0
Removes the cost.

Adding default metadata to new tags

The NSFW, Spoiler and Restricted flags can all be applied to newly created tags by default.

+tag config default 'flag'
Toggles whether to apply a metadata flag to a newly created tag.
Flag is one of "nsfw", "spoiler" or "restrict".

The Welcome Tag

This is how you define the custom content to use in 42's welcome message.

You can use {user} and {@user} brackets to name or mention the new user.

+tag welcome ['content'] Gets the welcome message. If content is given, sets the welcome content

Generic (Global) Tags

Generic tags are a new feature for Patreon supporters and allows for the creation of tags that can be used on any server.
As this poses a lot of issues over content, there are some rules about what a generic tag can contain, and it will be moderated both for content and QA.
These rules are as follows:

  • Tags must be signed by the author with a comment (eg1)
  • Tags must contain a long and short description, the latter being a single sentence. (eg2,3)
  • Absolutely no NSFW content. Spoilers for relatively new releases are also probably a bad idea.
  • No racism, sexism, homophobia or other anyism/anyphobia.
  • No harassment of specific users or servers.
  • No @everyone, @here, member, channel or role mentions. Custom emoji are allowed though.
  • No shilling of servers, social media hubs, bots or any other platform/service.

e.g. 1: {! tag <Tag name>, owner <Your name> } Don't try using {tag} because it is a comment.
e.g. 2: {!!description <Tag's description here> }
e.g. 3: {!!descshort <Single sentence here> }

Additionally, it is advised against using the {save} object or state variables as generic tags do not support them. Using state variables would require a user to claim the tag for their server.
If your tag requires state variables, you can add a check against {generic} to see if your tag has been copied to the server.

Please note that generic tags are not closed source, not restricted and can be copied to any server by anyone for private use or to view source code.

Pending changes
Any edit to generic tags, including deletion will send a pending change request to Kiwi Hangout. Supporters will be able to see and vote on these requests, though moderators will have the final say.
That being said, if you abuse the commands, you may have your ability to request any change other than a delete revoked until the month is over, so don't over do it please.

Masking generic tags
If you find a generic tag that you dislike or otherwise don't want on your server, you can mask it simply by creating a tag with the same name. This both makes the tag impossible to call, and to claim as the bot will start performing these actions on the local tag instead of the generic one.


Creating generic tags

There are 2 ways to create a generic tag, both ways submit the tag to the moderation channel before being completed.
Please ensure before you submit your tag that it works and does not break any rules.

+tag generic create 'name' With upload.
This creates a new generic tag from a yna file.
Name is the proposed name for the generic tag.
+tag generic create 'name' from 'tag name'
This submits an existing tag as a generic tag.
Name is the proposed name for the generic tag, tag name is the tag on the server to get the content from.

Editing existing generic tags

You can edit generic tags after they have been created, however the edit must also go through moderation.
The key point to editing a generic tag is that the spirit of the tag shouldn't change. As a general rule of thumb, if the description of the old tag doesn't fit the new tag at least in some capacity, your edit will be rejected.
If you want to create a tag with a different idea or theme, you should create a new generic tag

+tag generic edit 'name' With upload.
This requests an edit to a generic tag.
Name is the name of the generic tag to edit.

Deleting your generic tags

If you wish to delete your generic tag, it will first be placed in a schedule queue for a week. This serves 2 purposes. It gives you the chance to reverse your decision and it also gives other servers the chance to copy your tag before it is deleted.

Tags scheduled for deletion will be clearly marked in their info page.

+tag generic delete 'name'
This requests a generic tag to be deleted.
Name is the tag to be deleted.

Cancelling changes to generic tags

If you've made a mistake or wish to stop a change from happening, you can cancel it before it gets approved.
You cannot un-cancel a change, you'd have to propose the change again.

+tag generic cancel 'id' ID is the ID of the change to cancel. This can be found in the top left corner of the status embed.
Viewing the status of your pending changes

While supporters will always be able to see the status of any generic tag, and even vote on which ones to approve, it is useful to be able to see what changes you are waiting on.
This command will tell you what your pending create is, if it has been accepted or rejected and why, and what other changes you have requested.

+tag generic status
Gets status of pending changes.

Viewing the generic catalouge

Generic tags can be viewed in a list in the same way that list works. This also posts the short description of each tag.

+tag generic list Posts an interractive window listing generic tags

Making local copies of generic tags

Some tags may use state variables and require copying to the server. To do this, you can use the claim command.
This makes a local copy of a generic tag under your name.
If a generic tag is masked, you cannot copy it. This is because instead of copying the generic, 42 will try and take ownership of the tag masking the generic instead.

+tag claim 'name'
Name is the generic tag to copy to your server.

Return to top.