Skip to content

Commit

Permalink
Merge pull request #129 from NathanelM/main
Browse files Browse the repository at this point in the history
Retrying the merge for the Discord Markdown formatting package
  • Loading branch information
smeech authored Aug 23, 2024
2 parents 5f085a6 + 1cbfce9 commit 4b70c8d
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 0 deletions.
38 changes: 38 additions & 0 deletions packages/discord-snippet/0.1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Espanso Discord Markdown Snippets

Improve your Discord experience using this snippets triggers.

## Text Formatting

| Trigger | Command | Name |
| --------------- | ---------------------------------------- | --------------------- |
| :dita | \_$\|$\_ | Italic |
| :dbo | \*\*$\|$\*\* | Bold |
| :dun | \_\_$\|$\_\_ | Underline |
| :ditb | \*\*\*$\|$\*\*\* | Bold Italic |
| :duit | \_\_\*$\|$\*\_\_ | Underline Italic |
| :dubo | \_\_\*\*$\|$\*\*\_\_ | Underline Bold |
| :dubi | \_\_\*\*\*$\|$\*\*\*\_\_ | Underline Bold Italic |
| :dst | \~\~$\|$\~\~ | Strikethrough |
| :dh1 | # $\|$ | Header 1 |
| :dh2 | ## $\|$ | Header 2 |
| :dh3 | ### $\|$ | Header 3 |

### Text Blocks

| Trigger | Command | Name |
| --------------- | ---------------------------------------- | -------------- |
| :dco | \`$\|$\` | Code Block |
| :dmco | \`\`\`$\|$\`\`\` | Multi line Code|
| :dsp | \|\|$\|$\|\| | Spoiler |
| :dqu | > $\|$ | Quote |
| :dbq | >>> $\|$ | Block Quote |

### Links and Mentions

| Trigger | Command | Name |
| --------------- | ---------------------------------------- | -------------- |
| :dme | <@$\|$> | Mention |
| :dch | <#$\|$> | Channel Mention |
| :dro | <@&$\|$> | Role Mention |
| :dli | \[\$\|$\](Clipboard) | Masked Link |
7 changes: 7 additions & 0 deletions packages/discord-snippet/0.1.1/_manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: "discord-snippet"
title: "Discord Snippets"
description: A Collection of snippets for Discord Markdown
version: 0.1.1
author: Nathanel Moulin
homepage: "https://github.com/NathanelM/discord-snippet/tree/main"
tags: ["utility", "discord", "markdown"]
108 changes: 108 additions & 0 deletions packages/discord-snippet/0.1.1/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# espanso configuration file

# This is the default configuration file, change it as you like it
# You can refer to the official documentation:
# https://espanso.org/docs/

# Matches are the substitution rules, when you type the "trigger" string
# it gets replaced by the "replace" string.
name: discord-snippet
parent: default

matches:
### ----------------
### Text Formatting
### ----------------

# Discord Italic
- trigger: ":dita"
replace: "_$|$_"

# Discord Bold
- trigger: ":dbo"
replace: "**$|$**"

# Discord Underline
- trigger: ":dun"
replace: "__$|$__"

# Discord Bold Italic
- trigger: ":ditb"
replace: "***$|$***"

# Discord Underline Italic
- trigger: ":duit"
replace: "__*$|$*__"

# Discord Underline Bold
- trigger: ":dubo"
replace: "__**$|$**__"

# Discord Underline Bold Italic
- trigger: ":dubi"
replace: "__***$|$***__"

# Discord Strikethrough
- trigger: ":dst"
replace: "~~$|$~~"

# Discord Header 1
- trigger: ":dh1"
replace: "# $|$"

# Discord Header 2
- trigger: ":dh2"
replace: "## $|$"

# Discord Header 3
- trigger: ":dh3"
replace: "### $|$"


### ----------------
### Text Blocks
### ----------------

# Discord Code block
- trigger: ":dco"
replace: "`$|$`"

# Discord Multi line Code Block
- trigger: ":dmco"
replace: "```\n $|$ \n```"

# Discord Spoiler
- trigger: ":dsp"
replace: "||$|$||"

# Discord Quote
- trigger: ":dqu"
replace: "> $|$"

# Discord Block Quote
- trigger: ":dbq"
replace: ">>> $|$"

### ----------------
### Links and Mentions
### ----------------

# Discord Mention
- trigger: ":dme"
replace: "@$|$"

# Discord Channel Mention
- trigger: ":dch"
replace: "#$|$"

# Discord Role Mention
- trigger: ":dro"
replace: "@&$|$"

# Discord Masked Link
- trigger: ":dli"
replace: "[$|$]({{clipboard_content}})"
vars:
- name: clipboard_content
type: clipboard

0 comments on commit 4b70c8d

Please sign in to comment.