1
1
{
2
- "Disnake Main Template " : {
3
- "prefix" : " !dstart " ,
2
+ "Disnake Main File " : {
3
+ "prefix" : [ " dis.main " , " dis.template " , " dis.bot " ] ,
4
4
"body" : [
5
5
" import disnake" ,
6
6
" from disnake.ext import commands" ,
11
11
" " ,
12
12
" @bot.event" ,
13
13
" async def on_ready():" ,
14
- " print (f\" Logged in as {bot.user}.\" )" ,
14
+ " \t print (f\" Logged in as {bot.user}.\" )" ,
15
15
" " ,
16
16
" " ,
17
17
" bot.run(\" ${2:BOT_TOKEN}\" )" ,
18
18
" "
19
19
],
20
20
},
21
- "Disnake Prefix Command Template " : {
22
- "prefix" : " ! cmd" ,
21
+ "Disnake Prefix Command" : {
22
+ "prefix" : [ " dis. cmd" , " dis.command " , " dis.prefix " ] ,
23
23
"description" : " A command template" ,
24
24
"body" : [
25
25
" @${1|bot,client|}.command(${2:aliases=[\" $3\" ]})" ,
26
26
" async def ${4:command_name}(ctx$5):" ,
27
- " $0"
28
- ],
29
- },
30
- "Disnake Event Template" : {
31
- "prefix" : " !evt" ,
32
- "description" : " An event template" ,
33
- "body" : [
34
- " @${1|bot,client|}.event" ,
35
- " async def on_$2($3):" ,
36
- " $0"
27
+ " \t $0"
37
28
],
38
29
},
39
- "Disnake Cog Command Template " : {
40
- "prefix" : " !cogcmd " ,
41
- "description" : " A prefix command template for cogs " ,
30
+ "Disnake Slash Command" : {
31
+ "prefix" : " dis.slash " ,
32
+ "description" : " A slash command template" ,
42
33
"body" : [
43
- " @commands.command( ${1:aliases =[\" $2 \" ]})" ,
44
- " async def ${3 :command_name}(self, ctx$4 ):" ,
34
+ " @${1|bot,client|}.slash_command({2:guild_ids =[\" $3 \" ]})" ,
35
+ " async def ${4 :command_name}(ctx$5 ):" ,
45
36
" \t $0"
46
37
],
47
38
},
48
- "Disnake Cog Event Template" : {
49
- "prefix" : " !cogevt" ,
39
+ "Disnake Event" : {
40
+ "prefix" : " dis.evt" ,
41
+ "description" : " An event template" ,
50
42
"body" : [
51
- " @commands.Cog.listener() " ,
52
- " async def on_$1(self, $2 ):" ,
53
- " $0"
43
+ " @${1|bot,client|}.event " ,
44
+ " async def on_$2($3 ):" ,
45
+ " \t $0"
54
46
],
55
47
},
56
- "Disnake Cog Template " : {
57
- "prefix" : " ! cog" ,
48
+ "Disnake Cog" : {
49
+ "prefix" : " dis. cog" ,
58
50
"body" : [
59
51
" import disnake" ,
60
52
" from disnake.ext import commands" ,
61
53
" " ,
62
54
" " ,
63
55
" class ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}}(commands.Cog):" ,
64
56
" " ,
65
- " def __init__(self, bot):" ,
66
- " self .bot = bot" ,
57
+ " \t def __init__(self, bot):" ,
58
+ " \t\t self .bot = bot" ,
67
59
" " ,
68
- " $0" ,
60
+ " \t $0" ,
69
61
" " ,
70
62
" def setup(bot):" ,
71
- " bot .add_cog(${1:CogName}(bot))" ,
63
+ " \t bot .add_cog(${1:CogName}(bot))" ,
72
64
" "
73
65
],
74
66
},
75
- }
67
+ "Disnake Cog Command" : {
68
+ "prefix" : " dis.cog.cmd" ,
69
+ "description" : " A prefix command template for cogs" ,
70
+ "body" : [
71
+ " @commands.command(${1:aliases=[\" $2\" ]})" ,
72
+ " async def ${3:command_name}(self, ctx$4):" ,
73
+ " \t $0"
74
+ ],
75
+ },
76
+ "Disnake Cog Event" : {
77
+ "prefix" : " dis.cog.evt" ,
78
+ "body" : [
79
+ " @commands.Cog.listener()" ,
80
+ " async def on_$1(self, $2):" ,
81
+ " \t $0"
82
+ ],
83
+ },
84
+ }
0 commit comments