middleman

Credits: sync#9074 (assume prefix is `-`) Usage: -middleman <@user>/<trade_details>/<#channel> Requirements/Usage info: - Create a feed in a channel where you would like the middleman role to be pinged. (-feed create FEEDNAME @middleman). - Replace the content in the PingChannelID variable with the ID of the channel where you created the feed. - Replace the content in the TradeChnlIDS variable with the ID's whatever fight/trade channels you want the tag to be used in. - Replace the content in the Prefix variable with your current main carl-bot prefix. You are free to make any changes to your code and you can dm me in discord if you want me to help you make any changes.

Privateunrated

Content

74 lines
{=():}
{=(CREDITS):This unique tag is created by sync#9074}


{=(COMMENT):Codeblock under this comment is variable assignment.}
{=(PingChannelID):MIDDLEMAN FEED CHANNEL ID}
{=(TradeChnlIDS):TRADE/FIGHT CHANNEL ID(S)}
{=(FeedName):MIDDLEMAN FEED NAME}
{=(Prefix):CARL BOT PREFIX}


{=(COMMENT):Codeblock under this comment is the calculation part or whatever lol. Please do not change any values unless you are familiar with how tags work.}
{=(SplitCharacter):/}
{=(ArgLength):{index(&458$):{args} &458$}}
{=(NewArgLength):{index(&458$):{replace({SplitCharacter},. .):{args}} &458$}}
{=(TotalArgs):{m:trunc({NewArgLength}-{ArgLength})}}
{=(NumArgs):{m:trunc(2-{TotalArgs})}}
{=(NumArgs2):{if({NumArgs} < 0):{m:trunc(-1*{NumArgs})}}}

{=(PUsers):{if({user(id)} == {target(id)}):False|True}}


{=(COMMENT):Codeblock under this comment are the variables for the embed that will execute when arguments are missing or exceeded}
{=(MATitle):{if({NumArgs} < 0):Exceeded Required Arguments!|Missing Required Arguments!}}
{=(MAColor):#b4aa54}
{=(MADesc1):{if({NumArgs} < 0):You have exceeded the limit of argument(s) in your **Middleman Request**|You did not fill in the required argument(s) in your **Middleman Request**}}
{=(MADesc):```yaml
Example 1: {Prefix}mm @sync/6m for 1 pem/#trade-market-1
Example 2: {Prefix}mm @sync/5 tro vs 1 crown/#fights
```
{MADesc1}. Please refer to the examples provided above.
**Note**: Any kinds of "troll" requests will **not** be tolerated!}
{=(MAFooter):Usage: {Prefix}mm @user/<trade_details>/<trade_channel>}


{=(COMMENT):Codeblock under this comment are the variables for the embed that will execute when user does not mention someone}
{=(MUTitle):You forgot to mention somebody!}
{=(MUColor):#b45456}
{=(MUDesc):```yaml
Example 1: {Prefix}mm @sync/6m for 1 pem/#trade-market-1
Example 2: {Prefix}mm @sync/5 tro vs 1 crown/#fights
```
You need to mention **somebody besides yourself** to invoke this tag! Please refer to the examples provided above.
**Note**: Any kinds of "troll" requests will **not** be tolerated!}


{=(COMMENT):Codeblock under this comment are the variables for the embed that will execute when everything necessary is entered by the user}
{=(CATitle):{user(proper)} is requesting for a middleman!}
{=(CAColor):#5474b4}
{=(CADesc):
**Tag Invoker**: {user(mention)}
**Other Trader**: {args(1):/}
**Trade**: {args(2):/}
**Channel**: {args(3):/}}
{=(CAFooter):A middleman will be on their way!}


{=(COMMENT):Codeblock under this comment is the execution block. Please do not make any changes unless you are familiar with how tags work}
{=(DelExec):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):del|}}
{{DelExec}}
{=(MiddlemanFeed):c:feed announce {FeedName} {user(mention)} is requesting a middleman in {args(3):/}!}
{=(FeedExec):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{MiddlemanFeed}|}}
{{FeedExec}}
{=(EMTitle):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CATitle}|{if({PUsers} == True):{MATitle}|{MUTitle}}}}
{=(EMColor):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CAColor}|{if({PUsers} == True):{MAColor}|{MUColor}}}}
{=(EMDesc):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CADesc}|{if({PUsers} == True):{MADesc}|{MUDesc}}}}
{=(EMFooter):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CAFooter}|{MAFooter}}}
{=(RedirectExec):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):redirect:{PingChannelID}|}}
{{RedirectExec}}


{require():{TradeChnlIDS}}
{embed(color):{EMColor}}
{override}

Embed

1 line
{"color": 5198940, "author": {"name": "{EMTitle}", "icon_url": "{user(icon)}"}, "footer": {"text": "{EMFooter}"}, "description": "{EMDesc}"}
Raw JSON
{
  "id": 1080546,
  "created_at": "2021-09-27T08:12:49.000Z",
  "tag_name": "middleman",
  "nsfw": false,
  "owner_id": "688917796943560734",
  "uses": 0,
  "description": "Credits: sync#9074\n(assume prefix is `-`)\n\nUsage: -middleman <@user>/<trade_details>/<#channel>\n\nRequirements/Usage info:\n    - Create a feed in a channel where you would like the middleman role to be pinged. (-feed create FEEDNAME @middleman).\n    - Replace the content in the PingChannelID variable with the ID of the channel where you created the feed.\n    - Replace the content in the TradeChnlIDS variable with the ID's whatever fight/trade channels you want the tag to be used in.\n    - Replace the content in the Prefix variable with your current main carl-bot prefix.\n\nYou are free to make any changes to your code and you can dm me in discord if you want me to help you make any changes.",
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "877822567245840425",
  "sharer": "688917796943560734",
  "content": "{=():}\n{=(CREDITS):This unique tag is created by sync#9074}\n\n\n{=(COMMENT):Codeblock under this comment is variable assignment.}\n{=(PingChannelID):MIDDLEMAN FEED CHANNEL ID}\n{=(TradeChnlIDS):TRADE/FIGHT CHANNEL ID(S)}\n{=(FeedName):MIDDLEMAN FEED NAME}\n{=(Prefix):CARL BOT PREFIX}\n\n\n{=(COMMENT):Codeblock under this comment is the calculation part or whatever lol. Please do not change any values unless you are familiar with how tags work.}\n{=(SplitCharacter):/}\n{=(ArgLength):{index(&458$):{args} &458$}}\n{=(NewArgLength):{index(&458$):{replace({SplitCharacter},. .):{args}} &458$}}\n{=(TotalArgs):{m:trunc({NewArgLength}-{ArgLength})}}\n{=(NumArgs):{m:trunc(2-{TotalArgs})}}\n{=(NumArgs2):{if({NumArgs} < 0):{m:trunc(-1*{NumArgs})}}}\n\n{=(PUsers):{if({user(id)} == {target(id)}):False|True}}\n\n\n{=(COMMENT):Codeblock under this comment are the variables for the embed that will execute when arguments are missing or exceeded}\n{=(MATitle):{if({NumArgs} < 0):Exceeded Required Arguments!|Missing Required Arguments!}}\n{=(MAColor):#b4aa54}\n{=(MADesc1):{if({NumArgs} < 0):You have exceeded the limit of argument(s) in your **Middleman Request**|You did not fill in the required argument(s) in your **Middleman Request**}}\n{=(MADesc):```yaml\nExample 1: {Prefix}mm @sync/6m for 1 pem/#trade-market-1\nExample 2: {Prefix}mm @sync/5 tro vs 1 crown/#fights\n```\n{MADesc1}. Please refer to the examples provided above.\n**Note**: Any kinds of \"troll\" requests will **not** be tolerated!}\n{=(MAFooter):Usage: {Prefix}mm @user/<trade_details>/<trade_channel>}\n\n\n{=(COMMENT):Codeblock under this comment are the variables for the embed that will execute when user does not mention someone}\n{=(MUTitle):You forgot to mention somebody!}\n{=(MUColor):#b45456}\n{=(MUDesc):```yaml\nExample 1: {Prefix}mm @sync/6m for 1 pem/#trade-market-1\nExample 2: {Prefix}mm @sync/5 tro vs 1 crown/#fights\n```\nYou need to mention **somebody besides yourself** to invoke this tag! Please refer to the examples provided above.\n**Note**: Any kinds of \"troll\" requests will **not** be tolerated!}\n\n\n{=(COMMENT):Codeblock under this comment are the variables for the embed that will execute when everything necessary is entered by the user}\n{=(CATitle):{user(proper)} is requesting for a middleman!}\n{=(CAColor):#5474b4}\n{=(CADesc):\n**Tag Invoker**: {user(mention)}\n**Other Trader**: {args(1):/}\n**Trade**: {args(2):/}\n**Channel**: {args(3):/}}\n{=(CAFooter):A middleman will be on their way!}\n\n\n{=(COMMENT):Codeblock under this comment is the execution block. Please do not make any changes unless you are familiar with how tags work}\n{=(DelExec):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):del|}}\n{{DelExec}}\n{=(MiddlemanFeed):c:feed announce {FeedName} {user(mention)} is requesting a middleman in {args(3):/}!}\n{=(FeedExec):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{MiddlemanFeed}|}}\n{{FeedExec}}\n{=(EMTitle):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CATitle}|{if({PUsers} == True):{MATitle}|{MUTitle}}}}\n{=(EMColor):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CAColor}|{if({PUsers} == True):{MAColor}|{MUColor}}}}\n{=(EMDesc):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CADesc}|{if({PUsers} == True):{MADesc}|{MUDesc}}}}\n{=(EMFooter):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):{CAFooter}|{MAFooter}}}\n{=(RedirectExec):{and({PUsers} == True|{NumArgs} == 0|{args(1):/}!=|{args(2):/}!=|{args(3):/}!=):redirect:{PingChannelID}|}}\n{{RedirectExec}}\n\n\n{require():{TradeChnlIDS}}\n{embed(color):{EMColor}}\n{override}",
  "embed": "{\"color\": 5198940, \"author\": {\"name\": \"{EMTitle}\", \"icon_url\": \"{user(icon)}\"}, \"footer\": {\"text\": \"{EMFooter}\"}, \"description\": \"{EMDesc}\"}",
  "last_fetched": "2026-10-20T17:41:45.482Z"
}