Skip to content

Commit 0cee7f8

Browse files
committed
released version 1.1.0
Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp` Add more info in the readme file
1 parent b11f2a3 commit 0cee7f8

File tree

6 files changed

+85
-3
lines changed

6 files changed

+85
-3
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,8 @@ dmypy.json
125125
.pyre/
126126

127127
# VSIX File
128-
*.vsix
128+
*.vsix
129+
130+
# vscode settings
131+
.vscode/settings.json
132+

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
22
"cSpell.words": [
3+
"Coenraad",
4+
"Monokai",
35
"ahtp",
6+
"cgchk",
47
"cgcmd",
58
"cgevt",
6-
"dpstrt"
9+
"dpstrt",
10+
"embedhelp",
11+
"gbchk"
712
]
813
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ All notable changes to the "discord-py-snippets" extension will be documented in
99
## [1.0.1]
1010

1111
- Fix some bugs
12+
13+
### 1.1.0
14+
15+
Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp`
16+
Add more info in the readme file

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,26 @@ This extension contributes the following settings:
3838
* `myExtension.enable`: enable/disable this extension
3939
* `myExtension.thing`: set to `blah` to do something -->
4040

41+
## All snippets
42+
43+
| Name | Prefix | Description |
44+
|---------------------------------------------|--------------|---------------------------------------------------------------------------------------------------------------------|
45+
| Starter Template | `!dpstrt` | A starter template |
46+
| Basic Command Template | `!cmd` | A basic command template (Not for cogs) |
47+
| Basic Event Template | `!evt` | A basic event template (Not for cogs) |
48+
| Cog Command Template | `!cgcmd` | A basic command template for cogs |
49+
| Cog Event Template | `!cgevt` | A basic event template for cogs |
50+
| Cog Template | `!cog` | A starter template for a cog |
51+
| aiohttp Template | `!ahtp` | A basic aiohttp web request template (You need to have bot.session defined as a instance of aiohttp.ClientSession) |
52+
| Global Check Template | `gbchk` | A basic global check template |
53+
| Cog Check Template | `!cgchk` | A basic cog check template |
54+
| Embed Help | `embedhelp` | A custom help command implementation that modifies the default help and uses embed |
55+
56+
## Tips and Tricks
57+
58+
- Use Tab to navigate between required inputs
59+
- Once a input is focused on, press tab again to skip it if you don't want to add that
60+
4161
## Known Issues
4262

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

5373
Fix some bugs
5474

75+
### 1.1.0
76+
77+
Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp`
78+
Add more info in the readme file
79+
80+
### Extensions in the screenshots
81+
82+
- [Monokai](https://marketplace.visualstudio.com/items?itemName=monokai.theme-monokai-pro-vscode) by [monokai](https://marketplace.visualstudio.com/publishers/monokai)
83+
84+
- [Bracket Pair Colorizer](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer) by [CoenraadS](https://marketplace.visualstudio.com/publishers/CoenraadS)
85+
86+
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) by [Street Side Software](https://marketplace.visualstudio.com/publishers/streetsidesoftware)
87+
88+
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) by [Microsoft](https://marketplace.visualstudio.com/publishers/Microsoft)
89+
5590
-----------------------------------------------------------------------------------------------------------
5691

5792
**Enjoy!**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "discord-py-snippets",
33
"displayName": "discord.py Code Snippets",
44
"description": "Some code snippets for the discord.py package in python",
5-
"version": "1.0.1",
5+
"version": "1.1.0",
66
"publisher": "WasiMaster",
77
"repository": {
88
"type": "git",

snippets/snippets.code-snippets

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,38 @@
8080
" $0"
8181
],
8282
"description": "You need to have bot.session defined as a instance of aiohttp.ClientSession"
83+
},
84+
"discord.py Global Check Template":{
85+
"prefix": "!gbchk",
86+
"body": [
87+
"@${1|bot,client|}.check",
88+
"async def ${2:bot_check}(ctx):",
89+
" $0"
90+
],
91+
"description": "A basic global check template"
92+
},
93+
"discord.py Cog Check Template":{
94+
"prefix": "!cgchk",
95+
"body": [
96+
"async def cog_check(self, ctx):",
97+
" $0",
98+
" if $1:",
99+
" return True",
100+
" else:",
101+
" return False",
102+
],
103+
"description": "A basic cog check template"
104+
},
105+
"discord.py Embed Help":{
106+
"prefix": "!embedhelp",
107+
"body": [
108+
"class MyNewHelp(commands.MinimalHelpCommand):",
109+
"async def send_pages(self):",
110+
" destination = self.get_destination()",
111+
" for page in self.paginator.pages:",
112+
" embed = discord.Embed(description=page)",
113+
" await destination.send(embed=embed)"
114+
],
115+
"description": "A custom help command implementation that modifies the default help and uses embed"
83116
}
84117
}

0 commit comments

Comments
 (0)