-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit a314382
Showing
28 changed files
with
1,244 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,49 @@ | ||
# Contributing to Project Luf 🤖 | ||
|
||
We welcome contributions from the community to make Project Luf even more awesome! Whether you want to report a bug, suggest an enhancement, or contribute code, here's how you can get involved. | ||
|
||
## Reporting Bugs 🐛 | ||
|
||
If you encounter a bug or issue with Project Luf, please follow these steps to report it: | ||
|
||
1. Check the [GitHub Issues](https://github.com/WilardzySenpai/Project-Luf/issues) to see if the issue has already been reported. If it has, feel free to add any additional information or context as a comment on the existing issue. | ||
|
||
2. If the issue hasn't been reported yet, please create a new issue. Be sure to provide a clear and concise description of the problem, including steps to reproduce it if possible. Don't forget to mention the version of Project Luf you are using. | ||
|
||
## Suggesting Enhancements 💡 | ||
|
||
Have an idea to make Project Luf better? We'd love to hear it! Here's how you can suggest enhancements: | ||
|
||
1. Check the [GitHub Issues](https://github.com/WilardzySenpai/Project-Luf/issues) to see if your enhancement idea has already been proposed. If it has, you can show your support by adding a 👍 reaction or adding additional thoughts as comments. | ||
|
||
2. If your enhancement idea is new, create a new issue with a clear and detailed description of the proposed enhancement. Explain why it would be beneficial and provide any relevant details or examples. | ||
|
||
## Contributing Code 🛠️ | ||
|
||
If you're interested in contributing code to Project Luf, please follow these guidelines: | ||
|
||
1. Fork the Project Luf repository to your own GitHub account. | ||
|
||
2. Create a new branch in your forked repository for your changes. | ||
|
||
3. Make your changes and ensure they are well-documented, with clear comments and explanations where necessary. | ||
|
||
4. Run any tests or checks as needed to ensure your code is functioning correctly. | ||
|
||
5. Submit a pull request (PR) to the main Project Luf repository with a clear title and description of your changes. Be sure to reference any related issues. | ||
|
||
6. Your PR will be reviewed by the maintainers, and any necessary feedback or changes will be discussed. | ||
|
||
7. Once your PR is approved, it will be merged into the main project. | ||
|
||
## Code Style and Guidelines 📋 | ||
|
||
Please follow the code style and guidelines outlined in the [CONTRIBUTING.md](CONTRIBUTING.md) file in this repository. Consistency and readability are essential. | ||
|
||
## Licensing 📜 | ||
|
||
By contributing to Project Luf, you agree that your contributions will be licensed under the [MIT License](LICENSE). | ||
|
||
Thank you for your contributions and for helping make Project Luf amazing! | ||
|
||
Happy coding! 🚀 |
Empty file.
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,28 @@ | ||
{ | ||
"name": "nodejs", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node ." | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@types/node": "^18.0.6", | ||
"anime-wallpaper": "^1.1.1", | ||
"axios": "^1.4.0", | ||
"chalk": "^2.4.1", | ||
"cheerio": "^1.0.0-rc.12", | ||
"discord.js": "^14.11.0", | ||
"discord.js-v14-helper": "^1.11.4", | ||
"dotenv": "^16.3.1", | ||
"moment": "^2.29.4", | ||
"mongoose": "^7.3.1", | ||
"ms": "^2.1.3", | ||
"node-fetch": "^3.3.1", | ||
"replicate": "^0.12.3" | ||
} | ||
} |
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,45 @@ | ||
# Project Luf 🤖 | ||
|
||
![Project Luf](https://media.discordapp.net/attachments/1123137133331365888/1154435192191193140/project_luf.png) | ||
|
||
Welcome to Project Luf, your ultimate Discord bot experience! With a passion for innovation, Project Luf brings you a feature-packed bot designed to elevate your Discord server to new heights. | ||
|
||
## Features 🚀 | ||
|
||
- **Verification:** Keep your server secure and troll-free with our robust verification system. | ||
|
||
- **Anime Info:** Delve into the world of anime with up-to-date information at your fingertips. | ||
|
||
- **Fun Games:** Banish boredom with a variety of entertaining games that will keep your community engaged for hours. | ||
|
||
- **Interactive Fun:** Interact with Project Luf, your virtual buddy who's always ready for a chat or a good laugh. | ||
|
||
- **Moderation Commands:** Maintain order in your server with powerful moderation tools. | ||
|
||
But that's not all! Project Luf is an evolving project, and we're continuously working on adding more exciting features to make your Discord experience even better. Stay tuned for updates and surprises! | ||
|
||
## Getting Started 🛠️ | ||
|
||
To add Project Luf to your Discord server, follow these simple steps: | ||
|
||
1. Visit the [Project Luf Invite Link](#) and authorize the bot on your server. | ||
|
||
2. Configure the bot's permissions based on your server's needs. | ||
|
||
3. Start using Project Luf's fantastic features and enhance your server's functionality and entertainment value. | ||
|
||
## Contribution 🤝 | ||
|
||
We welcome contributions from the community! Whether you want to report a bug, suggest an enhancement, or even contribute code, check out our [Contribution Guidelines](CONTRIBUTING.md) to get started. | ||
|
||
## Support 📢 | ||
|
||
If you encounter any issues or have questions about Project Luf, join our [Discord Support Server](#) for assistance. Our friendly community and development team are here to help. | ||
|
||
## License 📜 | ||
|
||
Project Luf is released under the [MIT License](LICENSE), so feel free to use, modify, and distribute it as you see fit. | ||
|
||
--- | ||
|
||
We're excited to have you on board with Project Luf! Join us in this journey of innovation and fun. Let's make your Discord server truly remarkable together! 🌟 |
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,79 @@ | ||
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ApplicationCommandOptionType } = require('discord.js'); | ||
const models = require('../../config/models'); | ||
|
||
module.exports = { | ||
command_data: { | ||
name: 'imagine', | ||
description: 'Generate an image using a prompt.', | ||
type: 1, | ||
options: [ | ||
{ | ||
name: 'prompt', | ||
description: 'Enter your prompt', | ||
type: ApplicationCommandOptionType.String, | ||
required: true | ||
}, | ||
{ | ||
name: 'model', | ||
description: 'The image model', | ||
type: ApplicationCommandOptionType.String, | ||
choices: models, | ||
required: false | ||
} | ||
], | ||
}, | ||
role_perms: null, | ||
developers_only: false, | ||
owner_only: false, | ||
cooldown: 5, | ||
logger: true, | ||
category: "Fun", | ||
run: async (client, interaction) => { | ||
try { | ||
await interaction.deferReply(); | ||
|
||
const { default: Replicate } = await import('replicate'); | ||
|
||
const replicate = new Replicate({ | ||
auth: "r8_4CPjfy5UwnlJ3l2lPui8RFdjR2bAXHS2u5yaZ" || process.env.REPLICATE_API_KEY, | ||
}); | ||
|
||
const prompt = interaction.options.getString('prompt'); | ||
const model = interaction.options.getString('model') || models[0].value; | ||
|
||
const output = await replicate.run(model, { input: { prompt } }); | ||
|
||
const row = new ActionRowBuilder().addComponents( | ||
new ButtonBuilder() | ||
.setLabel(`Download`) | ||
.setStyle(ButtonStyle.Link) | ||
.setURL(`${output[0]}`) | ||
.setEmoji('1101133529607327764') | ||
); | ||
|
||
const resultEmbed = new EmbedBuilder() | ||
.setTitle('Image Generated') | ||
.addFields({ name: 'Prompt', value: prompt }) | ||
.setImage(output[0]) | ||
.setColor('#44a3e3') | ||
.setFooter({ | ||
text: `Requested by ${interaction.user.username}`, | ||
iconURL: interaction.user.displayAvatarURL({ dynamic: true }), | ||
}); | ||
|
||
await interaction.editReply({ | ||
embeds: [resultEmbed], | ||
components: [row], | ||
}); | ||
|
||
} catch (e) { | ||
console.log(e) | ||
const errorEmbed = new EmbedBuilder() | ||
.setTitle('An error occurred') | ||
.setDescription('```' + e + '```') | ||
.setColor(0xe32424); | ||
|
||
await interaction.editReply({ embeds: [errorEmbed] }); | ||
} | ||
} | ||
}; |
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,47 @@ | ||
const { EmbedBuilder } = require('discord.js'); | ||
|
||
module.exports = { | ||
command_data: { | ||
name: 'help', | ||
description: 'Help command', | ||
type: 1, | ||
options: [], | ||
}, | ||
role_perms: null, | ||
developers_only: false, | ||
cooldown: '10s', | ||
category: 'Information', | ||
run: async (client, interaction) => { | ||
await interaction.deferReply(); | ||
|
||
const commandsFetched = await client.application.commands.fetch(); | ||
|
||
const commands = []; | ||
|
||
commandsFetched.forEach((cmd) => { | ||
if (cmd.options?.length > 0) { | ||
for (let option of cmd.options) { | ||
if (option.type !== 1) continue; | ||
|
||
commands.push(`</${cmd.name} ${option.name}:${cmd.id}>`) | ||
}; | ||
} else { | ||
commands.push(`</${cmd.name}:${cmd.id}>`); | ||
}; | ||
}); | ||
|
||
await interaction.editReply({ | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setTitle('Help menu') | ||
.setAuthor({ | ||
name: client.user.username, | ||
iconURL: client.user.displayAvatarURL({ dynamic: true }) | ||
}) | ||
.setDescription(`Hello **${interaction.user.tag}**! Here are the list of my commands, click one of them to use:\n${commands.join(', ')}.`) | ||
.setColor('Blurple') | ||
] | ||
}); | ||
|
||
} | ||
}; |
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,48 @@ | ||
const { EmbedBuilder, ApplicationCommandOptionType } = require('discord.js'); | ||
|
||
module.exports = { | ||
command_data: { | ||
name: 'owners', | ||
description: 'Show the bot owners', | ||
type: 1, | ||
options: [], | ||
}, | ||
role_perms: null, | ||
developers_only: false, | ||
owner_only: true, | ||
cooldown: '5s', | ||
logger: true, | ||
category: '', | ||
run: async (client, interaction, config) => { | ||
try { | ||
await interaction.deferReply() | ||
|
||
const ownersID = config.users.owners; | ||
if (!ownersID) return; | ||
|
||
const ownersARRAY = []; | ||
|
||
ownersID.forEach(Owner => { | ||
const fetchedOWNER = interaction.guild.members.cache.get(Owner); | ||
if (!fetchedOWNER) ownersARRAY.push("*Unknown User#0000*"); | ||
ownersARRAY.push(`${fetchedOWNER}`); | ||
}); | ||
|
||
interaction.editReply({ | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setDescription(`**Only owners command!** \nOwners: **${ownersARRAY.join(", ")}**`) | ||
.setColor("Yellow") | ||
] | ||
}); | ||
} catch (e) { | ||
console.log(e) | ||
const errorEmbed = new EmbedBuilder() | ||
.setTitle('An error occurred') | ||
.setDescription('```' + e + '```') | ||
.setColor(0xe32424); | ||
|
||
await interaction.editReply({ embeds: [errorEmbed] }); | ||
} | ||
} | ||
}; |
Oops, something went wrong.