Skip to content

Commit c1f7111

Browse files
committed
1.3.0
1 parent 19b0a26 commit c1f7111

File tree

4 files changed

+98
-50
lines changed

4 files changed

+98
-50
lines changed

CHANGELOG.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ All notable changes to the "discord-py-snippets" extension will be documented in
88

99
## [1.0.1]
1010

11-
- Fix some bugs
11+
- Fixed some bugs
1212

1313
## [1.1.0]
1414

15-
- Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp`
16-
- Add more info in the readme file
15+
- Added 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp`
16+
- Added more info in the readme file
1717

1818
## [1.2.0]
1919

20-
- Add not shadowing command snippets (for function names for commands that are already defined eg. eval)
21-
- Add embed snippets
20+
- Added not shadowing command snippets (for function names for commands that are already defined eg. eval)
21+
- Added embed snippets
2222
- embed
2323
- field
2424
- footer
@@ -28,8 +28,17 @@ All notable changes to the "discord-py-snippets" extension will be documented in
2828

2929
### [1.2.1]
3030

31-
- Fix a issue in the `!emb` snippet where there were double commas
31+
- Fixed a issue in the `!emb` snippet where there were double commas
3232

3333
### [1.2.2]
3434

35-
- Fix a issue in the `!emb` snippet where there was a : where there shouldn't be one
35+
- Fixed a issue in the `!emb` snippet where there was a : where there shouldn't be one
36+
37+
### [1.3.0]
38+
39+
- Added Group Template `!grp`
40+
- Added Group command Template `!grpcmd`
41+
- Made event names always start with `on_`
42+
- Made it easier to add commands with aliases
43+
- Changed the command in `!dpstrt` from `test` to `hello`
44+
- Made it easier to know what a value is for

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ This extension contributes the following settings:
6262
| Cog Check Template | `!cgchk` | A basic cog check template |
6363
| Embed Help | `!embedhelp` | A custom help command implementation that modifies the default help and uses embed |
6464
| Not Shadowing Command Template | `!unscmd` | A basic command template that doesn't shadow another function (Not for cogs) |
65-
| Cog Not Shadowing Command Template | `!cgunscmd` | A basic command template that doesn't shadow another function for cogs |
65+
| Cog Not Shadowing Command Template | `!cgunscmd` | A basic command template that doesn't shadow another function for cogs |
66+
| Group Template | `!grp` | A group template (Can be used in cogs) |
67+
| Group Command Template | `!grpcmd` | A basic group command template (Can be used in cogs) |
6668

6769
### Embed Snippets
6870

@@ -87,27 +89,27 @@ There isn't many snippets so any suggestions for snippets would be appreciated
8789
## Contribute
8890

8991
You can open a pull request anytime and I will look into it <br>
90-
I suggest seeing the [vscode snippets documentation](https://code.visualstudio.com/docs/editor/userdefinedsnippets "VSCode Snippets Documentation") before you open a pull request
92+
I suggest seeing the [vscode snippets documentation](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets "VSCode Snippets Documentation") before you open a pull request
9193

9294
## Release Notes
9395

9496
### 1.0.0
9597

96-
Initial release of discord.py-snippets
98+
- Initial release of discord.py-snippets
9799

98100
### 1.0.1
99101

100-
Fix some bugs
102+
- Fixed some bugs
101103

102104
### 1.1.0
103105

104-
Add 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp` <br>
105-
Add more info in the readme file
106+
- Added 3 new snippets, `!gbchk`, `cgchk` & `!embedhelp` <br>
107+
- Added more info in the readme file
106108

107109
### 1.2.0
108110

109-
- Add not shadowing command snippets (for function names for commands that are already defined)
110-
- Add embed snippets
111+
- Added not shadowing command snippets (for function names for commands that are already defined)
112+
- Added embed snippets
111113
- embed
112114
- field
113115
- footer
@@ -117,11 +119,20 @@ Add more info in the readme file
117119

118120
### 1.2.1
119121

120-
- Fix a issue in the `!emb` snippet where there were double commas
122+
- Fixed a issue in the `!emb` snippet where there were double commas
121123

122124
### 1.2.2
123125

124-
- Fix a issue in the `!emb` snippet where there was a : where there shouldn't be one
126+
- Fixed a issue in the `!emb` snippet where there was a : where there shouldn't be one
127+
128+
### 1.3.0
129+
130+
- Added Group Template `!grp`
131+
- Added Group command Template `!grpcmd`
132+
- Made event names always start with `on_`
133+
- Made it easier to add commands with aliases
134+
- Changed the command in `!dpstrt` from `test` to `hello`
135+
- Made it easier to know what a value is for
125136

126137
### Extensions in the screenshots
127138

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "discord-py-snippets",
33
"displayName": "discord.py Code Snippets",
4-
"description": "Some code snippets for the discord.py package in python",
5-
"version": "1.2.2",
4+
"description": "Code snippets for the discord.py package in python",
5+
"version": "1.3.0",
66
"publisher": "WasiMaster",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/wasi-master/vscode-discord.py-snippets"
1010
},
1111
"icon": "icon.png",
1212
"engines": {
13-
"vscode": "^1.50.0"
13+
"vscode": "^0.10.0"
1414
},
1515
"keywords": [
1616
"discord.py",

snippets/snippets.code-snippets

Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"discord.py Starter Template":{
2+
"discord.py Starter Template": {
33
"prefix": "!dpstrt",
44
"body": [
55
"import discord",
@@ -9,64 +9,64 @@
99
"bot = commands.Bot(command_prefix=\"${1:!}\")",
1010
"",
1111
"@bot.command()",
12-
"async def test(ctx):",
13-
" await ctx.send(\"Test\")",
12+
"async def hello(ctx):",
13+
" await ctx.send(\"Hello, I am a robot\")",
1414
"",
1515
"bot.run(\"${2:Token}\")",
1616
""
1717
],
1818
"description": "A starter template"
1919
},
20-
"discord.py Basic Command Template":{
20+
"discord.py Basic Command Template": {
2121
"prefix": "!cmd",
2222
"body": [
23-
"@${1|bot,client|}.command()",
24-
"async def ${2:test}(ctx$3):",
23+
"@${1|bot,client|}.command(${2:aliases=[\"$3\"]})",
24+
"async def ${4:command_name}(ctx$5):",
2525
" await ctx.send(\"$0\")"
2626
],
2727
"description": "A basic command template (Not for cogs)"
2828
},
29-
"discord.py Not Shadowing Command Template":{
29+
"discord.py Not Shadowing Command Template": {
3030
"prefix": "!unscmd",
3131
"body": [
32-
"@${1|bot,client|}.command(name=\"${2:test}\")",
33-
"async def _${2:test}(ctx$3):",
32+
"@${1|bot,client|}.command(name=\"${2:command_name}\"${3:, aliases=[\"$4\"]})",
33+
"async def _${2:command_name}(ctx$5):",
3434
" await ctx.send(\"$0\")"
3535
],
3636
"description": "A basic command template that doesn't shadow another function (Not for cogs)"
3737
},
38-
"discord.py Basic Event Template":{
38+
"discord.py Basic Event Template": {
3939
"prefix": "!evt",
4040
"body": [
4141
"@${1|bot,client|}.event",
42-
"async def ${2:on_message}($3):",
42+
"async def on_$2($3):",
4343
" $0"
4444
],
4545
"description": "A basic event template (Not for cogs)"
4646
},
47-
"discord.py Cog Command Template":{
47+
"discord.py Cog Command Template": {
4848
"prefix": "!cgcmd",
4949
"body": [
50-
"@commands.command()",
51-
"async def ${1:test}(self, ctx$2):",
50+
"@commands.command(${1:aliases=[\"$2\"]})",
51+
"async def ${3:command_name}(self, ctx$4):",
5252
" await ctx.send(\"$0\")"
5353
],
5454
"description": "A basic command template for cogs"
5555
},
56-
"discord.py Cog Not Shadowing Command Template":{
56+
"discord.py Cog Not Shadowing Command Template": {
5757
"prefix": "!cgunscmd",
5858
"body": [
59-
"@commands.command(name=\"${2:test}\")",
60-
"async def _${2:test}(self, ctx$3):",
59+
"@commands.command(name=\"${1:command_name}\"${2:, aliases=[\"$3\"]})",
60+
"async def _${1:command_name}(self, ctx$4):",
6161
" await ctx.send(\"$0\")"
6262
],
6363
"description": "A basic command template that doesn't shadow another function for cogs"
6464
},
65-
"discord.py Cog Event Template":{
65+
"discord.py Cog Event Template": {
6666
"prefix": "!cgevt",
6767
"body": [
6868
"@commands.Cog.listener()",
69-
"async def ${1:on_ready}(self, $2):",
69+
"async def on_$1(self, $2):",
7070
" $0"
7171
],
7272
"description": "A basic event template for cogs"
@@ -90,7 +90,35 @@
9090
],
9191
"description": "A starter template for a cog"
9292
},
93-
"aiohttp Basic Usage Template":{
93+
"discord.py Group Template": {
94+
"prefix": "!grp",
95+
"body": [
96+
"@${1|bot,client,commands|}.group(invoke_without_subcommnads=True${3:, aliases=[\"$4\"]})",
97+
"async def ${2:group_name}(self, ctx$11):",
98+
" await ctx.send(\"$0\")",
99+
"",
100+
"",
101+
"@${2:group_name}.command(name=\"${5:subcommand_name}\"${6:, aliases=[\"$7\"]})",
102+
"async def $2_${5:subcommand_name}(self, ctx$12):",
103+
" await ctx.send(\"\")",
104+
"",
105+
"",
106+
"@${2:group_name}.command(name=\"${8:subcommand_name}\"${9:, aliases=[\"$10\"]})",
107+
"async def $2_${8:subcommand_name}(self, ctx$13):",
108+
" await ctx.send(\"\")"
109+
],
110+
"description": "A group template"
111+
},
112+
"discord.py Group Command Template": {
113+
"prefix": "!grpcmd",
114+
"body": [
115+
"@${1:group_name}.command(name=\"${2:subcommand_name}\"${3:, aliases=[\"$4\"]})",
116+
"async def $1_${2:subcommand_name}(self, ctx$5):",
117+
" await ctx.send(\"$0\")"
118+
],
119+
"description": "A group command template that is meant to add more commands to a group"
120+
},
121+
"aiohttp Basic Usage Template": {
94122
"prefix": "!ahtp",
95123
"body": [
96124
"async with ${1|bot,client,self.bot,self.client|}.session.get(\"$2\") as r:",
@@ -99,7 +127,7 @@
99127
],
100128
"description": "You need to have bot.session defined as a instance of aiohttp.ClientSession"
101129
},
102-
"discord.py Global Check Template":{
130+
"discord.py Global Check Template": {
103131
"prefix": "!gbchk",
104132
"body": [
105133
"@${1|bot,client|}.check",
@@ -108,7 +136,7 @@
108136
],
109137
"description": "A basic global check template"
110138
},
111-
"discord.py Cog Check Template":{
139+
"discord.py Cog Check Template": {
112140
"prefix": "!cgchk",
113141
"body": [
114142
"async def cog_check(self, ctx):",
@@ -120,7 +148,7 @@
120148
],
121149
"description": "A basic cog check template"
122150
},
123-
"discord.py Embed Help":{
151+
"discord.py Embed Help": {
124152
"prefix": "!embedhelp",
125153
"body": [
126154
"class MyNewHelp(commands.MinimalHelpCommand):",
@@ -132,44 +160,44 @@
132160
],
133161
"description": "A custom help command implementation that modifies the default help and uses embed"
134162
},
135-
"discord.py Embed Template":{
163+
"discord.py Embed Template": {
136164
"prefix": "!emb",
137165
"body": [
138166
"embed = discord.Embed(${1:title=\"$2\",} ${3:description=\"$4\",} ${5:color=$6,} ${7:timestamp=$8,})"
139167
],
140168
"description": "Makes a Embed"
141169
},
142-
"discord.py Embed Field Template":{
170+
"discord.py Embed Field Template": {
143171
"prefix": "!embfield",
144172
"body": [
145173
"${1:embed}.add_field(name=\"$2\", value=\"$3\", inline=${4|True,False|})"
146174
],
147175
"description": "Adds a field to a embed"
148176
},
149-
"discord.py Embed Footer Template":{
177+
"discord.py Embed Footer Template": {
150178
"prefix": "!embfoot",
151179
"body": [
152180
"${1:embed}.set_footer(text=\"$2\", ${3:icon_url=\"${4}\"})"
153181
],
154182
"description": "Adds a footer to a embed"
155183
},
156-
"discord.py Embed Author Template":{
184+
"discord.py Embed Author Template": {
157185
"prefix": "!embauthor",
158186
"body": [
159187
"${1:embed}.set_author(name=\"$2\", ${3:url=\"${4}\",} ${5:icon_url=\"${6}\"})"
160188
],
161189
"description": "Adds a author to a embed"
162190
},
163-
"discord.py Embed Thumbnail Template":{
191+
"discord.py Embed Thumbnail Template": {
164192
"prefix": "!embthumb",
165193
"body": [
166194
"${1:embed}.set_thumbnail(url=\"$2\")"
167195
]
168196
},
169-
"discord.py Embed Image Template":{
197+
"discord.py Embed Image Template": {
170198
"prefix": "!embimg",
171199
"body": [
172200
"${1:embed}.set_image(url=\"$2\")"
173201
]
174202
}
175-
}
203+
}

0 commit comments

Comments
 (0)