Skip to content

Commit

Permalink
GitBook: [master] 2 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlGroth authored and gitbook-bot committed Dec 17, 2018
1 parent 3c26c39 commit 2a19534
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 149 deletions.
94 changes: 10 additions & 84 deletions misc/silly-useless.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,13 @@
# Silly/useless

| Name | Example | Usage |
| :--- | :--- | :--- |
| \[pc\|postcount\] \[@member\] | !pc @Carl\#0080 | Shows the amount of messages the bot has seen the member post. |
| postcount top | -- | Shows the all time 20 most active members as far as the bot's concerned. |
| \[aesthetics\|ae\] | !ae 600 iq | Returns your text as fullwidth. The example would return "600iq" |
| \[smallcaps\|sc\] | !sc neumann | Returns your text as smallcaps. The example would return "ɴᴇᴜᴍᴀɴɴ" |
| 8ball | !8ball will anyone ever love me? | It's like any other 8ball command on discord. Annoying, useless and unreasonably popular. |
| echo \[\#channel\] | !echo \#general Is this enough to pass the turing test? | Makes the bot say the message in the mentioned channel or in the channel the comand was used in if no channel is supplied. |
| speak \[@member\] | !speak @Yenni\#2794 | Uses [Markov chains](https://github.com/jsvine/markovify) to generate sentences based on what that person has said in the past. |
| space | !space ![:white\_check\_mark:](https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg)This is a test. | ![:white\_check\_mark:](https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg)This ![:white\_check\_mark:](https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg)is ![:white\_check\_mark:](https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg)a ![:white\_check\_mark:](https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg)test ![:white\_check\_mark:](https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg)sentence. ![:white\_check\_mark:](https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg) |


<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Example</th>
<th style="text-align:left">Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">[pc|postcount] [@member]</td>
<td style="text-align:left">!pc @Carl#0080</td>
<td style="text-align:left">Shows the amount of messages the bot has seen the member post.</td>
</tr>
<tr>
<td style="text-align:left">postcount top</td>
<td style="text-align:left">--</td>
<td style="text-align:left">Shows the all time 20 most active members as far as the bot's concerned.</td>
</tr>
<tr>
<td style="text-align:left">[aesthetics|ae]
<text>
</td>
<td style="text-align:left">!ae 600 iq</td>
<td style="text-align:left">Returns your text as fullwidth. The example would return "600iq"</td>
</tr>
<tr>
<td style="text-align:left">[smallcaps|sc]
<text>
</td>
<td style="text-align:left">!sc neumann</td>
<td style="text-align:left">Returns your text as smallcaps. The example would return "ɴᴇᴜᴍᴀɴɴ"</td>
</tr>
<tr>
<td style="text-align:left">8ball</td>
<td style="text-align:left">!8ball will anyone ever love me?</td>
<td style="text-align:left">It's like any other 8ball command on discord. Annoying, useless and unreasonably
popular.</td>
</tr>
<tr>
<td style="text-align:left">echo [#channel]
<text>
</td>
<td style="text-align:left">!echo #general Is this enough to pass the turing test?</td>
<td style="text-align:left">Makes the bot say the message in the mentioned channel or in the channel
the comand was used in if no channel is supplied.</td>
</tr>
<tr>
<td style="text-align:left">speak [@member]</td>
<td style="text-align:left">!speak @Yenni#2794</td>
<td style="text-align:left">Uses <a href="https://github.com/jsvine/markovify">Markov chains</a> to
generate sentences based on what that person has said in the past.</td>
</tr>
<tr>
<td style="text-align:left">
<p>space
<br />
<emoji>
</p>
<p>
<text>
</p>
</td>
<td style="text-align:left">!space
<img src="https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg"
alt=":white_check_mark:" />This is a test.</td>
<td style="text-align:left">
<img src="https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg"
alt=":white_check_mark:" />This
<img src="https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg"
alt=":white_check_mark:" />is
<img src="https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg"
alt=":white_check_mark:" />a
<img src="https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg"
alt=":white_check_mark:" />test
<img src="https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg"
alt=":white_check_mark:" />sentence.
<img src="https://discordapp.com/assets/c6b26ba81f44b0c43697852e1e1d1420.svg"
alt=":white_check_mark:" />
</td>
</tr>
</tbody>
</table>
126 changes: 61 additions & 65 deletions tags-and-responses/tags-advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,117 +4,113 @@ Tags are easy to use, but very powerful. With some ingenuity you can create your

As of writing this, these blocks are:

**Random lists** `#{comma, separated,#{nested args}}`
**Random lists** `{random: a, b, c}`

Unlike random lists assigned to a variable through variable blocks, unique random lists randomly pick an element each time. This allows for some very nice commands, see the link at the bottom.

**Math blocks** `m{1 + 1 / (3 ^ 9)}`
**Math blocks** `{math: 1 + 1 / (3 ** 9)}`

Supports relatively advanced math.
Supports basic math.

`+ - * / ^ % sin cos tan exp abs trunc round sgn log ln log2`

**React blocks** `react{:regional_indicator_f:}` `reactu{:regional_indicator_x:, :regional_indicator_d:}`
**React blocks** `{react: :regional_indicator_f: :cool_roblox_emoji:}` `{reactu: :regional_indicator_f: :cool_roblox_emoji:}`

This will react to the tag\(react\) or original message \(reactu\) with the emojis placed inside the brackets

Unsure what this could be used for? `!tag create doubt react{:regional_indicator_x:} https://i.imgur.com/EacBuLR.png`
**50/50 blocks** `{50:Will anyone see me?}`

**50/50 blocks** `?{Will anyone see me?}`
Has a 50% chance of showing up

**Command blocks** `c{temp stockholm}`
**Command blocks** `{cmd: temp stockholm}`

Do you think that `!info` really should be called `!whois`? with command blocks you can do just that

`!tag + whois c{info $args}`

Maybe you think speak defaulting to 5 uses is an idiotic design choice, simply do

`!tag + betterspeak c{speak 20 $args}`
`!tag + whois {cmd: info {args}}`

Important to note is that command tags are effectively not tags in the sense that whatever else you put in a tag won't be sent
**Actions** `{dm} {delete} {silence}`

**Action blocks** a{_action_} where _action_ is `pm` or `delete` \(or both, comma separated\)

`pm` pms the content of the tag to the user who triggered the tag
`dm` Redirects output to the user who uses the command

`delete` deletes the message that triggered the tag

**Formatted time blocks** strf{_strftime_}
`silence` Silences the output of any command being used

**Formatted time blocks** {strf\(optional datetime\): _strftime_}

Returns the current time formatted according to python's strftime, see [http://strftime.org/](http://strftime.org/) for more information.

**Example:** `The current year is strf{%Y} hehe`
**Example:** `The current year is {str:%Y} hehe`

**Redirection blocks** redirect{\#channel}
**Advanced** `Your account was created at {strf({user(created_at)}: %x}`

Redirects the output of the tag to the specified channel, the tag user needs to have send message permissions in the pointed channel
**Redirection blocks** {redirect: \#channel}

**Example:** `$author says: $args redirect{#screaming-out-loud}`
Redirects the output of the tag to the specified channel, the tag creator needs to have send message permissions in the pointed channel

**Requirement blocks** require{\#channel, member, role}
**Example:** `{user} says: {args} {redirect:#screaming-out-loud}`

takes roles, members and channels. Feel free to mix these, the logic goes as following: Channels are linked together with OR meaning as long as you use the tag in any of the mentioned channels, the channel logic evaluates to true. Roles are linked together with AND meaning you need all the specified roles. Members are linked together with OR meaning you have to be one of the specified members. Together, these are linked together with AND, meaning you can require a role AND a channel in order for it to work.
**Requirement blocks** {require:\#channel, role}

**Example:** `require{Cool kids} Word around the office is that $author is kind of a big deal`
takes roles and channels.

**Blacklist blocks** blacklist{\#channel, member, role}
**Example:** `{require:Cool kids} Word around the office is that {user} is kind of a big deal`

works like require but the other way. As soon as it sees an entity that it doesn't like, it will evaluate to false.
**Blacklist blocks** {blacklist:\#channel, role}

**Example:** `blacklist{muted, Carl#0001} Wow, this tag really is for cool people only`
works like require but the other way. As soon as it sees an entity that it doesn't like, it will evaluate to false.

**variable assignment** `!{foo=This can be anything}`
**Example:** `{blacklist: muted} Wow, you've been a bad boy`

**Unique random list variables** `#variablename{comma, separated, values}`
**variable assignment** `{let(foo):This can be anything}`

In addition to these blocks, it also comes with a few default arguments. These are:

`$unix` - Unix time, useful for math blocks

`$uses` - The amount of times the tag has been used

`$args` - The words after the tag invocation. `!foo bar baz` means $args=bar baz

`$commandargs` - The words after the tag invocation, unlike `$args` this includes mentions in the `<@id>` format \(useful for command blocks\)

`$authorid` - The ID of the person using the command, useful for command blocks

`$userid` - The ID of the first mention or author if there aren't any

`$user` - Nickname of the first mentioned user or author if there aren't any mentions

`$channel` - The name of the channel mentioned or the channel the command was used in

`$server` - The name of the server

`$mention` - The nickname of the first mentioned user or NOTHING if there aren't any mentions

`$nuser` - The _name_ of $user
`{unix}` - Unix time, useful for math blocks

`$nmention` - The _name_ of $mention
`{uses}` - The amount of times the tag has been used

`$nauthor` - The _name_ of $author
`{args}` - The words after the tag invocation. `!foo bar baz` means {args}=bar baz

`$authorid` - The ID of the author
`{user}` - Nickname of the author

`$userid` - The ID of the mentioned user if mentioned or the author if there aren't any mentions
`{target}` - Like user, except if you mention someone, this variable works for the mentioned user

`$serverid` - The ID of the server
`{server}` - The name of the server

`$randommember` - A random member's nickname
`{mention}` - Mentions the user of the tag

`$randomonline` - A random online member's nickname \(online in this case means not-offline i.e. away and busy count as online\)
Additionally, tagscript 2.0 has better support for various discord objects like members, channels and servers. We call these 'adapters' and let you access certain properties that previously would have been too specific to justify putting in To access a property, you put the property name in parens like {user\(id\)} Right now for tags there are four adapters: user, target, channel and server

`$randomoffline` - A random offline member's nickname
**user & target:**

`$membercount` - The total number of members in the server
* **avatar**: The user's avatar
* **id**: The user's id
* **mention**: a string to mention the user
* **created\_at**: yyyy-mm-dd HH.MM.SS
* **joined\_at**: yyyy-mm-dd HH.MM.SS
* **color**: hex code
* **name**: their actual _username_
* **position**: their position in the role hierarchy

`$humancount` - The total number of non-bots in the server
**server**

`$botcount` - The total number of bots in the server
* **icon**: server icon link
* **id**: server id
* **owner**: name\#discrim format of the server owner
* **random**: random member
* **randomonline**: random member who is online
* **randomoffline**: random member who is offline
* **members**: number of members:
* **bots**: number of bots
* **humans**: number of humans
* **roles**: number of roles
* **channels**: number of channels
* **created\_at**: when the server was created

`$1 $2 $3 etc` - Like $args but only the first, second, third word etc. `!foo bar baz` means $1=bar
**channel**

Still not sure how to use this? [See this link for some interesting and funny tags people have created using TagScript](https://pastebin.com/hXmtSpkF)
* **id**: the channel id
* **topic**: the channel topic
* **slowmode**: the current slowmode delay
* **position**: the channel's position
* **mention**: clickable link to the channel

0 comments on commit 2a19534

Please sign in to comment.