-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
39 lines (33 loc) · 1.31 KB
/
Copy pathindex.js
File metadata and controls
39 lines (33 loc) · 1.31 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
const Client = require("./client");
const Embed = require("./structure/Embeds");
const messageAttachment = require("./structure/MessageAttachment");
const Button = require("./structure/MessageComponents/Button");
const Modal = require("./structure/MessageComponents/TextInput");
const answeringcmd = require("./structure/MessageComponents/comandanswering");
const comdanswering = require("./structure/MessageComponents/comandanswering");
const Collection = require("./structure/Collection");
module.exports = {
Client: Client,
Embed: Embed,
MessageAttachment: messageAttachment,
Collection: Collection,
};
const bot = new Client()
bot.on('ready', () => {
console.log("bot is ready");
});
bot.on("message", msg => {
if(msg.author.bot) return;
// msg.channel.send("txt",{components:new button(2,"clickme","test")})
msg.channel.send({content: 'test', embeds: [], components: []}, new messageAttachment("index.js"));
});
bot.on("interactionCreate", interaction => {
if(interaction.custom_id == "test") {
interaction.reply(new Modal("the final test down", 1, "label", "mymodal", "ùytxtinput"));
};
if(interaction.custom_id == "mymodal") {
console.log(interaction.data.components[0].components);
interaction.reply(new comdanswering("finish"));
};
});
bot.login("");