New stuff

This commit is contained in:
Emotion 2023-04-29 21:59:08 +12:00
parent 0690d8fa0e
commit 954c687084
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 15EBDFF858B9A65A
39 changed files with 4797 additions and 3799 deletions

View file

@ -0,0 +1,15 @@
module.exports = (client, interaction) => {
// Check if our interaction is a slash command
if (interaction.isCommand()) {
// Get the command from our slash command collection
const command = client.interactions.get(interaction.commandName);
// If command does not exist return an error message
if (!command) return interaction.reply({
content: "Something Went Wrong | Perhaps command not registered?",
ephemeral: true
});
command.run(client, interaction);
}
}

View file

@ -0,0 +1,20 @@
module.exports = (client, message) => {
// return if author is a bot
if (message.author.bot) return;
// return if message does not match prefix (in command)
if (message.content.indexOf(client.config.prefix) !== 0) return;
// Defining what are arguments and commands
const args = message.content.slice(client.config.prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
// Get the command data from the client.commands Enmap
const cmd = client.commands.get(command);
// If command does not exist return
if (!cmd) return;
// Run the command
cmd.run(client, message, args);
};

53
events/discord/ready.js Normal file
View file

@ -0,0 +1,53 @@
const register = require('../../utils/slashsync');
const { ActivityType } = require('discord.js');
module.exports = async (client) => {
await register(client, client.register_arr.map((command) => ({
name: command.name,
description: command.description,
options: command.options,
type: '1'
})), {
debug: true
});
console.log(`[ / | Slash Command ] - ✅ Loaded all slash commands!`)
console.log(`[STATUS] ${client.user.tag} is now online!`);
const activities = [
'Your Giveaways',
'/help',
'www.elliebot.net'
]
setInterval(() => {
const status = activities[Math.floor(Math.random() * activities.length)];
client.user.setActivity({ name: `${status}`, type: ActivityType.Watching })
}, 5000);
};
// Do this one if you want the streaming Status //
/*
const register = require('../../utils/slashsync');
const { ActivityType } = require('discord.js');
module.exports = async (client) => {
await register(client, client.register_arr.map((command) => ({
name: command.name,
description: command.description,
options: command.options,
type: '1'
})), {
debug: true
});
console.log(`[ / | Slash Command ] - ✅ Loaded all slash commands!`)
console.log(`[STATUS] ${client.user.tag} is now online!`);
client.user.setActivity({ name: `Your Giveaways`, type: ActivityType.Streaming, url: 'https://youtube.com/' })
};*/

View file

@ -0,0 +1,14 @@
const Discord = require('discord.js');
module.exports = {
async execute(giveaway, member, reaction) {
reaction.users.remove(member.user);
member.send({
embeds: [
new Discord.EmbedBuilder()
.setColor("#2F3136")
.setDescription("<:cross:885049515323846696> **Oops! Looks Like that giveaway has already ended!** <:ended:1033984179672727553>"),
],
})
.catch((e) => {});
},
};

View file

@ -0,0 +1,34 @@
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
module.exports = {
async execute(giveaway, winners) {
winners.forEach((member) => {
member.send({
components: [new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel("Jump to the Giveaway")
.setStyle(ButtonStyle.Link)
.setURL(`https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}`)
.setEmoji('973495590921043968'),
new ButtonBuilder()
.setLabel("Invite Me")
.setStyle(ButtonStyle.Link)
.setURL("https://discord.com/api/oauth2/authorize?client_id=726333575091454002permissions=406881561681&scope=bot%20applications.commands")
.setEmoji('984296691794583582'))],
embeds: [new EmbedBuilder()
.setAuthor({name: "Congratulations!", iconURL: "https://ellie.gcoms.xyz/Ellise.png"})
.setColor("#2F3136")
.setThumbnail('https://ellie.gcoms.xyz/Ellise.png')
.setDescription(`<:DotYellow:1002212470812852245> Hello there ${member.user}\n <:DotBlue:1002212466480128032> Congrats!! you have won **${giveaway.prize}!**\n <:DotBlue:1002212466480128032> DM ${giveaway.hostedBy} to claim your prize!`)
.setImage('https://ellie.gcoms.xyz/Ellise.png')
.setTimestamp()
.setFooter({
text: `©️ Holana`,
iconURL: ('https://ellie.gcoms.xyz/Ellise.png')
})
]
}).catch(e => {})
});
}
}

View file

@ -0,0 +1,64 @@
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
module.exports = {
async execute(giveaway, reactor, messageReaction) {
const noice = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel("Invite Me")
.setStyle(ButtonStyle.Link)
.setURL("https://discord.com/api/oauth2/authorize?client_id=726333575091454002&permissions=406881561681&scope=bot%20applications.commands")
.setEmoji('984296691794583582'),
);
let approved = new EmbedBuilder()
.setTimestamp()
.setColor("#2F3136")
.setAuthor({name: "Entry Confirmed!", iconURL: "https://ellie.gcoms.xyz/Ellise.png"})
.setDescription(
`<:DotGreen:1002212464345239643> Your entry to **${giveaway.prize}** on [This Server](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}) has been approved! \n<:DotGreen:1002212464345239643> Earn extra points by **Voting**. \n<:DotPink:1002212468870877304> Hosted By: ${giveaway.hostedBy}`
)
.setFooter({ text: "©️ Holana", iconURL: ('https://ellie.gcoms.xyz/Ellise.png') })
.setTimestamp()
const lol = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel("Invite Me")
.setStyle(ButtonStyle.Link)
.setURL("https://discord.com/api/oauth2/authorize?client_id=726333575091454002&permissions=406881561681&scope=bot%20applications.commands")
.setEmoji('984296691794583582'),
);
let denied = new EmbedBuilder()
.setTimestamp()
.setColor("#2F3136")
.setAuthor({name: "Entry Denied!", iconURL: "https://ellie.gcoms.xyz/Ellise.png"})
.setDescription(
`<:DotPink:1002212468870877304> Your entry to **${giveaway.prize}** on [This Server](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}) has been denied! \n<:DotPink:1002212468870877304> Please review the requirements to enter the giveaway properly. \n<:DotPink:1002212468870877304> Hosted By: ${giveaway.hostedBy}`
)
.setFooter({ text: "©️ Holana", iconURL: ('https://ellie.gcoms.xyz/Ellise.png') })
let client = messageReaction.message.client
if (reactor.user.bot) return;
if(giveaway.extraData) {
if (giveaway.extraData.role !== "null" && !reactor.roles.cache.get(giveaway.extraData.role)){
messageReaction.users.remove(reactor.user);
return reactor.send({
embeds: [denied],
components: [lol]
}).catch(e => {})
}
return reactor.send({
embeds: [approved],
components: [noice]
}).catch(e => {})
} else {
return reactor.send({
embeds: [approved]
}).catch(e => {})
}
}
}

View file

@ -0,0 +1,27 @@
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
module.exports = {
async execute(giveaway, member) {
return member.send({
components: [new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel("Jump to the Giveaway")
.setStyle(ButtonStyle.Link)
.setURL(`https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}`)
.setEmoji('973495590921043968'))],
embeds: [new EmbedBuilder()
.setTimestamp()
.setAuthor({ name: "Reaction Removed!", iconURL: "https://ellie.gcoms.xyz/Ellise.png" })
.setTitle('Did You Just Remove a Reaction From A Giveaway?')
.setColor("#2F3136")
.setDescription(
`<:DotPink:1002212468870877304> Your entery to **${giveaway.prize}** on [This Server](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}) have been removed!\n <:DotPink:1002212468870877304> This means you're removed as a valid giveaway participant.\n <:DotGreen:1002212464345239643> Think It was a mistake? **Go react again!**`
)
.setFooter({ text: "©️ Holana", iconURL: ('https://ellie.gcoms.xyz/Ellise.png') })
]
}).catch(e => {})
}
}

View file

@ -0,0 +1,36 @@
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
module.exports = {
async execute(giveaway, winners) {
winners.forEach((member) => {
member.send({
components: [new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel("Jump to the Giveaway")
.setStyle(ButtonStyle.Link)
.setURL(`https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}`)
.setEmoji('973495590921043968'),
new ButtonBuilder()
.setLabel("Invite Me")
.setStyle(ButtonStyle.Link)
.setURL("https://discord.com/api/oauth2/authorize?client_id=726333575091454002&permissions=406881561681&scope=bot%20applications.commands")
.setEmoji('984296691794583582'))],
embeds: [new EmbedBuilder()
.setAuthor({name: "Congratulations!", iconURL: ('https://ellie.gcoms.xyz/Ellise.png')})
.setThumbnail('https://ellie.gcoms.xyz/Ellise.png')
.setColor("#2F3136")
.setDescription(`<:DotYellow:1002212470812852245> Hello there ${member.user}\n<:DotGreen:1002212464345239643> Host of the giveaway rerolled and you won the Giveaway!\n<:DotGreen:1002212464345239643> Good Job On Winning **${giveaway.prize}!** <:confetti:984296694357319730><:confetti:984296694357319730>\n<:DotGreen:1002212464345239643> DM ${giveaway.hostedBy} to claim your prize!!`)
.setImage('https://ellie.gcoms.xyz/Ellise.png')
.setTimestamp()
.setFooter({
text: "©️ Holana",
iconURL: ('https://ellie.gcoms.xyz/Ellise.png')
})
]
}).catch(e => {})
});
}
}

View file

@ -0,0 +1,8 @@
const chalk = require('chalk');
module.exports = {
name: "connected",
execute() {
console.log(chalk.greenBright("[MONGO DB]: Connected to MongoDB!"));
},
};

View file

@ -0,0 +1,8 @@
const chalk = require('chalk');
module.exports = {
name: "connecting",
execute() {
console.log(chalk.cyan("[MONGO DB]: Connecting to MongoDB..."));
},
};

View file

@ -0,0 +1,8 @@
const chalk = require('chalk');
module.exports = {
name: 'disconnected',
execute(client) {
console.log(chalk.red("[MONGO DB]: Disconnected from MongoDB!"));
},
};

8
events/mongo/err.js Normal file
View file

@ -0,0 +1,8 @@
const chalk = require('chalk');
module.exports = {
name: "err",
execute(err) {
console.log(chalk.red("[MONGO DB]: Error: " + err + ""));
},
};