-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9645dc8
commit c8458d7
Showing
20 changed files
with
1,197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TOKEN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.env | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This configuration file was automatically generated by Gitpod. | ||
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) | ||
# and commit this file to your remote git repository to share the goodness with others. | ||
|
||
tasks: | ||
- init: npm install | ||
command: npm start | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
//=====================================| Import the Module |=====================================\\ | ||
const { InteractionType, ChatInputCommandInteraction, Client, EmbedBuilder, WebhookClient } = require("discord.js"); | ||
|
||
//====================< Settings Module >===================\\ | ||
const Webhook = require("../../Structures/Settings/webhooks.json"); | ||
const Config = require("../../Structures/Settings/config.json"); | ||
const Emoji = require("../../Structures/Settings/emojis.json"); | ||
const Embed = require("../../Structures/Settings/embed.json"); | ||
|
||
//====================< Others Module >===================\\ | ||
const { author, version } = require(`../../package.json`); | ||
|
||
//=====================================| Code |=====================================\\ | ||
|
||
module.exports = { | ||
name: "interactionCreate", | ||
|
||
/** | ||
* @param {ChatInputCommandInteraction} interaction | ||
* @param {Client} client | ||
*/ | ||
|
||
async execute(interaction, client) { | ||
if (interaction.type === InteractionType.ModalSubmit) { | ||
if (interaction.customId === "modal-intro") { | ||
const realName = interaction.fields.getTextInputValue("intro-realname"); | ||
const birthday = interaction.fields.getTextInputValue("intro-birthday"); | ||
const age = interaction.fields.getTextInputValue("intro-age"); | ||
const origin = interaction.fields.getTextInputValue("intro-origin"); | ||
const hobby = interaction.fields.getTextInputValue("intro-hobby"); | ||
const user = interaction.member; | ||
const guild = interaction.guild; | ||
|
||
const introLogs = new WebhookClient({ | ||
id: Webhook.SystemLogs.Intro.ID, | ||
token: Webhook.SystemLogs.Intro.TOKEN | ||
}); | ||
|
||
introLogs.send({ | ||
username: client.user.username + " | User Intro", | ||
avatarURL: client.user.displayAvatarURL(), | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setColor(Embed.Colors.MainColor) | ||
.setAuthor({ name: `${user.user.tag}`, iconURL: guild.iconURL({ dynamic: true }) }) | ||
.setTitle("New User Intro") | ||
.setThumbnail(user.user.displayAvatarURL({ dynamic: true })) | ||
.addFields( | ||
{ name: "What is your real name?", value: `\`\`\`yml\n${realName}\`\`\`` }, | ||
{ name: "what date were you born?", value: `\`\`\`yml\n${birthday}\`\`\`` }, | ||
{ name: "How old are you?", value: `\`\`\`yml\n${age}\`\`\`` }, | ||
{ name: "Where you from?", value: `\`\`\`yml\n${origin}\`\`\`` }, | ||
{ name: "What are your hobbies?", value: `\`\`\`yml\n${hobby}\`\`\`` }, | ||
) | ||
] | ||
}); | ||
|
||
await interaction.reply({ | ||
ephemeral: true, | ||
content: `You introduction has been sent.` | ||
}); | ||
}; | ||
if (interaction.customId === "modal-feedback") { | ||
const feedbackDesk = interaction.fields.getTextInputValue("feedback-description"); | ||
const user = interaction.member; | ||
const guild = interaction.guild; | ||
|
||
const feedbackLogs = new WebhookClient({ | ||
id: Webhook.SystemLogs.Feedback.ID, | ||
token: Webhook.SystemLogs.Feedback.TOKEN | ||
}); | ||
|
||
feedbackLogs.send({ | ||
username: client.user.username + " | User Feedback", | ||
avatarURL: client.user.displayAvatarURL(), | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setColor(Embed.Colors.MainColor) | ||
.setAuthor({ name: `${user.user.tag}`, iconURL: guild.iconURL({ dynamic: true }) }) | ||
.setTitle("New User sent Feedback") | ||
.setThumbnail(user.user.displayAvatarURL({ dynamic: true })) | ||
.addFields( | ||
{ name: "Whats the feedback for you want to sent?", value: `\`\`\`yml\n${feedbackDesk}\`\`\`` }, | ||
) | ||
] | ||
}); | ||
|
||
await interaction.reply({ | ||
ephemeral: true, | ||
content: `You feedback has been sent.` | ||
}); | ||
}; | ||
}; | ||
} | ||
}; | ||
|
||
/** | ||
///////////////////////////////////////////////////////////////////// | ||
//// //// | ||
\\\\ Bot Coded by GalaXd#9165 \\\\ | ||
//// //// | ||
\\\\ Work for MGalaCyber Development | https://galacyber.xyz \\\\ | ||
//// //// | ||
\\\\ All Right Reserved! \\\\ | ||
//// //// | ||
///////////////////////////////////////////////////////////////////// | ||
*/ |
Oops, something went wrong.