portfolio

Portfolio/Ad/Socials Tag made by Asty' Add your Portfolio (including at least one link): [p]portfolio add <Your Portfolio Here> See someone's Portfolio: [p]portfolio @someone Full command description in the #show-off channel of the CBH server. For questions and bug reports, use #custom-command-support. Note: For the first time, I named every single variable with human-friendly names and added comments in the code for almost every single line. So even though you're not that familiar with Tagscript, you should be able to know what the code does!

Sharedunrated

Content

88 lines
{=(COMMENT):Temporary Require, for testing and debugging purposes. If you want the command to be used by a certain role and/or in a certain channel, replace the ID below with your role and/or channel IDs separated by commas.}
{require:337040974415003649}
{=(COMMENT):Deletes the command invocation and the bot's default commands' responses. Also overrides permissions, to allow the user to create the Portfolio trigger.}
{delete}{silence}{override}
{=(COMMENT):Put your prefix here. Will dynamically be used for command's instructions.}
{=(prefix):!}

{=(COMMENT):ID and name of the Portfolio role.}
{=(role.ExistingPortfolio):687298763647352872}
{=(role.name.ExistingPortfolio):Portfolio Added ✔}
{=(COMMENT):Checks if the user already created their Portfolio trigger. Condition to reuse later.}
{=(check.role.ExistingPortfolio):{if({contains({role.ExistingPortfolio}):{user(roleids)}}==true):true|false}}

{=(COMMENT):----ARGUMENT LOWERING AND CHECKS----}
{=(largs):{lower:{args}}}
{=(arg1):{list(0):{join(,):{args}}}}
{=(arg2):{list(1):{join(,):{args}}}}
{=(noargs):{if({args}==):true|false}}
{=(COMMENT):Checks if the first argument is "add". Condition to reuse later.}
{=(check.args.add):{if({arg1}==add):true|false}}
{=(COMMENT):Checks if the specified arguments contain any link at all. Condition to reuse later.}
{=(check.link):{if({in(http):{args(2+)}}==true):true|false}}

{=(COMMENT):Checks if the specified target is someone else than the user. Condition to reuse later.}
{=(check.isTargetUser):{if({target(id)}=={user(id)}):true|false}}

{=(COMMENT):Second wave of checks to conditionally display different outputs depending on the situation.}
{=(mention.TargetisUser):{if({check.isTargetUser}==true):{user(mention)}}}
{=(msg.link):{if({check.link}==true):{args}}}

{=(COMMENT):Blank variable to prevent blank elses to output two empty brackets.}
{=():}

{=(COMMENT):----COMMAND CHECKS AND EXECUTION----}
{=(COMMENT):Trigger creation command's content.}
{=(cmd.Trigger.creation):c:ar add "portfolio {user(mention)}" __**{user}**'s Portfolio:__
{args(2+)}}
{=(COMMENT):Role to Give to the user after they added their portfolio, preventing them from adding it again.}
{=(cmd.RoleToGive):c:role add {user(id)} {role.ExistingPortfolio}}

{=(COMMENT):Full check of Portfolio addition or not.}
{=(check.cmdToExecute):{all({check.role.ExistingPortfolio}==false|{check.args.add}==true|{check.link}==true|{check.isTargetUser}==true|{arg2}!=):true|false}}

{=(COMMENT):Conditionally calls the Trigger creation command, if they don't already have the ExistingPortfolio role, if the first argument is "add", if the user specified any link, if the user didn't mention anyone in their command (aside from themselves eventually), and if they added any portfolio content after "add" starting from the 3rd argument.}
{=(check.cmd.Trigger.creation):{if({check.cmdToExecute}==true):{cmd.Trigger.creation}}}
{=(COMMENT):Conditionally calls the command to give the ExistingPortfolio Role when the same conditions as above are met.}
{=(check.cmd.RoleToGive):{if({check.cmdToExecute}==true):{cmd.RoleToGive}}}

{=(COMMENT):Actual command execution.}
{{check.cmd.Trigger.creation}}
{{check.cmd.RoleToGive}}

{=(COMMENT):----OUTPUTS AND ERROR MESSAGES----}
{=(msg.Instructions):Use `{prefix}portfolio @someone` to check someone's Portfolio.
You can know if someone added theirs by checking the presence of the `{role.name.ExistingPortfolio}` role in their roles list.}
{=(COMMENT):Message to display when the requirements are met.}
{=(msg.Success):<a:AO_Yes:613463515474296867> **{user}**, you successfully added your personal Portfolio to the server!
{msg.Instructions}}
{=(COMMENT):First part of the message to display if the user specified "add" as the first argument but with nothing else.}
{=(msg.NoArgs1):<a:AO_No:613463514501349386> **{user}**, if you're trying to add your own Portfolio to the server, you need to specify at least one link along with the command.}
{=(COMMENT):First part of the message to display if the user already added their Portfolio to the server.}
{=(msg.NoArgs1.1):<a:AO_No:613463514501349386> **{user}**, you already added your own Portfolio to the server.}
{=(COMMENT):Second part of the message to display. Contains all the instructions.}
{=(msg.NoArgs2):If you're willing to check someone else's Portfolio, make sure you mention them along with the command.
__Usage Example:__ ```HTML
{prefix}portfolio add Check my Instagram at: <http://instagram.com/test/>
You can also check my website at: <http://test.com/>
If you need any form of art, mention me here or DM me! Thanks!``````HTML
{prefix}portfolio @someone```}
{=(COMMENT):Outputs different messages depending on the situation.}
{=(msg.Output):{if({check.cmdToExecute}==true):{msg.Success}|{and({check.role.ExistingPortfolio}==true|{args(1)}==add):{msg.NoArgs1.1}
{msg.NoArgs2}|{any({args}==|{check.args.add}==true):{msg.NoArgs1}
{msg.NoArgs2}}}}}

{=(COMMENT):Calls the output variable to print it to the user.}
{msg.Output}

{=(COMMENT):Debug Outputs. Only for testing purposes.}
{=(msg.Debug):__Debug Outputs:__
Do I have the ExistingPortfolio role? {if({check.role.ExistingPortfolio}==true):yes|no}
Is the first argument "add"? {if({check.args.add}==true):yes|no}
Is there more than one argument? {if({arg2}!=):yes|no}
Is there a link? {if({check.link}==true):yes|no}
Is the user the target? {if({check.isTargetUser}==true):yes|no}
Are all the conditions met? {if({check.cmdToExecute}==true):yes|no}
First argument: {arg1}
Second argument: {arg2}
Arguments: {args}}
Raw JSON
{
  "id": 131175,
  "created_at": "2020-03-11T13:57:25.000Z",
  "tag_name": "portfolio",
  "nsfw": false,
  "owner_id": "149926720114262016",
  "uses": 3,
  "description": "Portfolio/Ad/Socials Tag made by Asty'\n\nAdd your Portfolio (including at least one link):\n[p]portfolio add <Your Portfolio Here>\nSee someone's Portfolio:\n[p]portfolio @someone\n\nFull command description in the #show-off channel of the CBH server.\nFor questions and bug reports, use #custom-command-support.\n\nNote: For the first time, I named every single variable with human-friendly names and added comments in the code for almost every single line. So even though you're not that familiar with Tagscript, you should be able to know what the code does!",
  "restricted": false,
  "shared": true,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "314660900302749696",
  "sharer": "149926720114262016",
  "content": "{=(COMMENT):Temporary Require, for testing and debugging purposes. If you want the command to be used by a certain role and/or in a certain channel, replace the ID below with your role and/or channel IDs separated by commas.}\n{require:337040974415003649}\n{=(COMMENT):Deletes the command invocation and the bot's default commands' responses. Also overrides permissions, to allow the user to create the Portfolio trigger.}\n{delete}{silence}{override}\n{=(COMMENT):Put your prefix here. Will dynamically be used for command's instructions.}\n{=(prefix):!}\n\n{=(COMMENT):ID and name of the Portfolio role.}\n{=(role.ExistingPortfolio):687298763647352872}\n{=(role.name.ExistingPortfolio):Portfolio Added ✔}\n{=(COMMENT):Checks if the user already created their Portfolio trigger. Condition to reuse later.}\n{=(check.role.ExistingPortfolio):{if({contains({role.ExistingPortfolio}):{user(roleids)}}==true):true|false}}\n\n{=(COMMENT):----ARGUMENT LOWERING AND CHECKS----}\n{=(largs):{lower:{args}}}\n{=(arg1):{list(0):{join(,):{args}}}}\n{=(arg2):{list(1):{join(,):{args}}}}\n{=(noargs):{if({args}==):true|false}}\n{=(COMMENT):Checks if the first argument is \"add\". Condition to reuse later.}\n{=(check.args.add):{if({arg1}==add):true|false}}\n{=(COMMENT):Checks if the specified arguments contain any link at all. Condition to reuse later.}\n{=(check.link):{if({in(http):{args(2+)}}==true):true|false}}\n\n{=(COMMENT):Checks if the specified target is someone else than the user. Condition to reuse later.}\n{=(check.isTargetUser):{if({target(id)}=={user(id)}):true|false}}\n\n{=(COMMENT):Second wave of checks to conditionally display different outputs depending on the situation.}\n{=(mention.TargetisUser):{if({check.isTargetUser}==true):{user(mention)}}}\n{=(msg.link):{if({check.link}==true):{args}}}\n\n{=(COMMENT):Blank variable to prevent blank elses to output two empty brackets.}\n{=():}\n\n{=(COMMENT):----COMMAND CHECKS AND EXECUTION----}\n{=(COMMENT):Trigger creation command's content.}\n{=(cmd.Trigger.creation):c:ar add \"portfolio {user(mention)}\" __**{user}**'s Portfolio:__\n{args(2+)}}\n{=(COMMENT):Role to Give to the user after they added their portfolio, preventing them from adding it again.}\n{=(cmd.RoleToGive):c:role add {user(id)} {role.ExistingPortfolio}}\n\n{=(COMMENT):Full check of Portfolio addition or not.}\n{=(check.cmdToExecute):{all({check.role.ExistingPortfolio}==false|{check.args.add}==true|{check.link}==true|{check.isTargetUser}==true|{arg2}!=):true|false}}\n\n{=(COMMENT):Conditionally calls the Trigger creation command, if they don't already have the ExistingPortfolio role, if the first argument is \"add\", if the user specified any link, if the user didn't mention anyone in their command (aside from themselves eventually), and if they added any portfolio content after \"add\" starting from the 3rd argument.}\n{=(check.cmd.Trigger.creation):{if({check.cmdToExecute}==true):{cmd.Trigger.creation}}}\n{=(COMMENT):Conditionally calls the command to give the ExistingPortfolio Role when the same conditions as above are met.}\n{=(check.cmd.RoleToGive):{if({check.cmdToExecute}==true):{cmd.RoleToGive}}}\n\n{=(COMMENT):Actual command execution.}\n{{check.cmd.Trigger.creation}}\n{{check.cmd.RoleToGive}}\n\n{=(COMMENT):----OUTPUTS AND ERROR MESSAGES----}\n{=(msg.Instructions):Use `{prefix}portfolio @someone` to check someone's Portfolio.\nYou can know if someone added theirs by checking the presence of the `{role.name.ExistingPortfolio}` role in their roles list.}\n{=(COMMENT):Message to display when the requirements are met.}\n{=(msg.Success):<a:AO_Yes:613463515474296867> **{user}**, you successfully added your personal Portfolio to the server!\n{msg.Instructions}}\n{=(COMMENT):First part of the message to display if the user specified \"add\" as the first argument but with nothing else.}\n{=(msg.NoArgs1):<a:AO_No:613463514501349386> **{user}**, if you're trying to add your own Portfolio to the server, you need to specify at least one link along with the command.}\n{=(COMMENT):First part of the message to display if the user already added their Portfolio to the server.}\n{=(msg.NoArgs1.1):<a:AO_No:613463514501349386> **{user}**, you already added your own Portfolio to the server.}\n{=(COMMENT):Second part of the message to display. Contains all the instructions.}\n{=(msg.NoArgs2):If you're willing to check someone else's Portfolio, make sure you mention them along with the command.\n__Usage Example:__ ```HTML\n{prefix}portfolio add Check my Instagram at: <http://instagram.com/test/>\nYou can also check my website at: <http://test.com/>\nIf you need any form of art, mention me here or DM me! Thanks!``````HTML\n{prefix}portfolio @someone```}\n{=(COMMENT):Outputs different messages depending on the situation.}\n{=(msg.Output):{if({check.cmdToExecute}==true):{msg.Success}|{and({check.role.ExistingPortfolio}==true|{args(1)}==add):{msg.NoArgs1.1}\n{msg.NoArgs2}|{any({args}==|{check.args.add}==true):{msg.NoArgs1}\n{msg.NoArgs2}}}}}\n\n{=(COMMENT):Calls the output variable to print it to the user.}\n{msg.Output}\n\n{=(COMMENT):Debug Outputs. Only for testing purposes.}\n{=(msg.Debug):__Debug Outputs:__\nDo I have the ExistingPortfolio role? {if({check.role.ExistingPortfolio}==true):yes|no}\nIs the first argument \"add\"? {if({check.args.add}==true):yes|no}\nIs there more than one argument? {if({arg2}!=):yes|no}\nIs there a link? {if({check.link}==true):yes|no}\nIs the user the target? {if({check.isTargetUser}==true):yes|no}\nAre all the conditions met? {if({check.cmdToExecute}==true):yes|no}\nFirst argument: {arg1}\nSecond argument: {arg2}\nArguments: {args}}",
  "embed": "{}",
  "last_fetched": "2026-10-20T21:02:44.382Z"
}