Skip to content

Commit 89e8743

Browse files
committed
Added a on_ready to !dpstrt
1 parent 642b070 commit 89e8743

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ All notable changes to the "discord-py-snippets" extension will be documented in
6262
- Added UI Category with `!button`, `!cbutton` and `!select`
6363
- Added `!except` snippet
6464
- Fixed indendation in `!embedhelp`
65+
66+
### [1.5.1]
67+
68+
- Added a `on_ready` event in the `!dpstrt` snippet

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ I suggest seeing the [vscode snippets documentation](https://code.visualstudio.c
179179
- Added `!except` snippet
180180
- Fixed indendation in `!embedhelp`
181181

182+
### 1.5.1
183+
184+
- Added a `on_ready` event in the `!dpstrt` snippet
185+
182186
### Extensions in the screenshots
183187

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

snippets/snippets.code-snippets

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"",
99
"bot = commands.Bot(command_prefix=\"${1:!}\")",
1010
"",
11+
"@bot.event()",
12+
"async def on_ready():",
13+
" print(f\"Logged in as {bot.user}\")",
14+
"",
1115
"@bot.command()",
1216
"async def hello(ctx):",
1317
" await ctx.send(\"Hello, I am a robot\")",
@@ -247,7 +251,7 @@
247251
" $0"
248252
]
249253
},
250-
254+
251255
"discord.py Exception":{
252256
"prefix": "!except",
253257
"body": [
@@ -258,28 +262,28 @@
258262
],
259263
"description": "Add a basic exception."
260264
},
261-
265+
262266
"discord.py UI Button":{
263267
"prefix": "!button",
264268
"body": [
265269
"class ${1:My}Button(discord.ui.Button):",
266270
"",
267271
" async def callback(self, interaction: discord.Interaction):",
268-
" ${2:return await super().callback(interaction)}"
272+
" ${2:return await super().callback(interaction)}"
269273
],
270274
"description": "Add a basic button."
271275
},
272-
276+
273277

274278
"discord.py Custom UI Button":{
275279
"prefix": "!cbutton",
276280
"body": [
277-
"class ${1:My}Button(discord.ui.Button):",
281+
"class ${1:My}Button(discord.ui.Button):",
278282
"",
279283
" def __init__(self, *, style: ButtonStyle = ..., label: Optional[str] = None,",
280284
" disabled: bool = False, custom_id: Optional[str] = None,",
281285
" url: Optional[str] = None, emoji: Optional[Union[str, Emoji, PartialEmoji]] = None,",
282-
" row: Optional[int] = None, ${2:argname}: ${3:_type}):",
286+
" row: Optional[int] = None, ${2:argname}: ${3:_type}):",
283287
" super().__init__(style=style, label=label, disabled=disabled,",
284288
" custom_id=custom_id, url=url, emoji=emoji, row=row, $2=$2)",
285289
"",
@@ -293,7 +297,7 @@
293297
"discord.py UI Select":{
294298
"prefix": "!select",
295299
"body": [
296-
"class ${1:My}Select(discord.ui.Select):",
300+
"class ${1:My}Select(discord.ui.Select):",
297301
"",
298302
" async def callback(self, interaction: discord.Interaction):",
299303
" ${2:return await super().callback(interaction)}"

0 commit comments

Comments
 (0)