Skip to content

Commit

Permalink
release guide discord bot system
Browse files Browse the repository at this point in the history
  • Loading branch information
TheArs1274 committed Oct 26, 2022
1 parent 9645dc8 commit c8458d7
Show file tree
Hide file tree
Showing 20 changed files with 1,197 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOKEN=
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
node_modules
package-lock.json
9 changes: 9 additions & 0 deletions .gitpod.yml
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


13 changes: 13 additions & 0 deletions Events/Client/ready.js

Large diffs are not rendered by default.

324 changes: 324 additions & 0 deletions Events/Interaction/interactionButton.js

Large diffs are not rendered by default.

107 changes: 107 additions & 0 deletions Events/Interaction/interactionModal.js
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! \\\\
//// ////
/////////////////////////////////////////////////////////////////////
*/
Loading

0 comments on commit c8458d7

Please sign in to comment.