Skip to content

Commit

Permalink
released version 1.1.0
Browse files Browse the repository at this point in the history
Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp`
Add more info in the readme file
  • Loading branch information
wasi-master committed Oct 29, 2020
1 parent b11f2a3 commit 0cee7f8
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,8 @@ dmypy.json
.pyre/

# VSIX File
*.vsix
*.vsix

# vscode settings
.vscode/settings.json

7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"cSpell.words": [
"Coenraad",
"Monokai",
"ahtp",
"cgchk",
"cgcmd",
"cgevt",
"dpstrt"
"dpstrt",
"embedhelp",
"gbchk"
]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ All notable changes to the "discord-py-snippets" extension will be documented in
## [1.0.1]

- Fix some bugs

### 1.1.0

Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp`
Add more info in the readme file
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ This extension contributes the following settings:
* `myExtension.enable`: enable/disable this extension
* `myExtension.thing`: set to `blah` to do something -->

## All snippets

| Name | Prefix | Description |
|---------------------------------------------|--------------|---------------------------------------------------------------------------------------------------------------------|
| Starter Template | `!dpstrt` | A starter template |
| Basic Command Template | `!cmd` | A basic command template (Not for cogs) |
| Basic Event Template | `!evt` | A basic event template (Not for cogs) |
| Cog Command Template | `!cgcmd` | A basic command template for cogs |
| Cog Event Template | `!cgevt` | A basic event template for cogs |
| Cog Template | `!cog` | A starter template for a cog |
| aiohttp Template | `!ahtp` | A basic aiohttp web request template (You need to have bot.session defined as a instance of aiohttp.ClientSession) |
| Global Check Template | `gbchk` | A basic global check template |
| Cog Check Template | `!cgchk` | A basic cog check template |
| Embed Help | `embedhelp` | A custom help command implementation that modifies the default help and uses embed |

## Tips and Tricks

- Use Tab to navigate between required inputs
- Once a input is focused on, press tab again to skip it if you don't want to add that

## Known Issues

There isn't many snippets so any suggestions for snippets would be appreciated
Expand All @@ -52,6 +72,21 @@ Initial release of discord.py-snippets

Fix some bugs

### 1.1.0

Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp`
Add more info in the readme file

### Extensions in the screenshots

- [Monokai](https://marketplace.visualstudio.com/items?itemName=monokai.theme-monokai-pro-vscode) by [monokai](https://marketplace.visualstudio.com/publishers/monokai)

- [Bracket Pair Colorizer](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer) by [CoenraadS](https://marketplace.visualstudio.com/publishers/CoenraadS)

- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) by [Street Side Software](https://marketplace.visualstudio.com/publishers/streetsidesoftware)

- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) by [Microsoft](https://marketplace.visualstudio.com/publishers/Microsoft)

-----------------------------------------------------------------------------------------------------------

**Enjoy!**
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "discord-py-snippets",
"displayName": "discord.py Code Snippets",
"description": "Some code snippets for the discord.py package in python",
"version": "1.0.1",
"version": "1.1.0",
"publisher": "WasiMaster",
"repository": {
"type": "git",
Expand Down
33 changes: 33 additions & 0 deletions snippets/snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,38 @@
" $0"
],
"description": "You need to have bot.session defined as a instance of aiohttp.ClientSession"
},
"discord.py Global Check Template":{
"prefix": "!gbchk",
"body": [
"@${1|bot,client|}.check",
"async def ${2:bot_check}(ctx):",
" $0"
],
"description": "A basic global check template"
},
"discord.py Cog Check Template":{
"prefix": "!cgchk",
"body": [
"async def cog_check(self, ctx):",
" $0",
" if $1:",
" return True",
" else:",
" return False",
],
"description": "A basic cog check template"
},
"discord.py Embed Help":{
"prefix": "!embedhelp",
"body": [
"class MyNewHelp(commands.MinimalHelpCommand):",
"async def send_pages(self):",
" destination = self.get_destination()",
" for page in self.paginator.pages:",
" embed = discord.Embed(description=page)",
" await destination.send(embed=embed)"
],
"description": "A custom help command implementation that modifies the default help and uses embed"
}
}

0 comments on commit 0cee7f8

Please sign in to comment.