-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
109 lines (103 loc) · 3.24 KB
/
index.js
File metadata and controls
109 lines (103 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import dotenv from 'dotenv'
dotenv.config()
import {
Client,
GatewayIntentBits,
ButtonBuilder,
ButtonStyle,
ModalBuilder,
TextInputBuilder,
TextInputStyle
} from 'discord.js';
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.DirectMessages
],
});
client.login(process.env.DISCORD_TOKEN);
client.on('messageCreate', async (message) => {
console.log(message)
if (!message?.author.bot) {
message.author.send({
content: "Test!",
components: [
{
"type": 1,
"components": [
{
type: 2,
label: "Bouton Principal",
style: 1,
custom_id: 'button_main'
},
{
type: 2,
label: "Bouton secondaire",
style: 2,
custom_id: 'button_secondary'
},
{
type: 2,
label: "Bouton success",
style: 3,
custom_id: 'button_success'
},
{
type: 2,
label: "Bouton Danger",
style: 4,
custom_id: 'button_danger'
},
{
type: 2,
label: "Bouton Lien",
style: 5,
url: 'https://mail.google.com/mail/u/0/'
}
]
},
{
"type": 1,
"components": [
{
"type": 3,
"custom_id": "class_select_1",
"options":[
{
"label": "Caca",
"value": "caca",
"description": "faire un gros caca"
},
{
"label": "Pipi",
"value": "pipi",
"description": "Pipi"
},
{
"label": "Prout",
"value": "prout",
"description": "C QUI IL A PETE AHHHHHH"
}
],
"placeholder": "t",
"min_values": 1,
"max_values": 2
}
]
},
{
"type": 1,
"components": [
{
"type": 6,
"custom_id": "role",
}
]
}
]
});
}
});