From 33a8ddd796f854b10cc7740a8964f53b9b90d037 Mon Sep 17 00:00:00 2001 From: Noah Pombas Date: Mon, 30 Sep 2024 18:39:01 +0200 Subject: [PATCH] modified: .env modified: README.md modified: commands/moderation/moveuser.js modified: handler/index.js modified: index.js modified: package.json commands/moderation/ban.js node_modules/ package-lock.json --- .env | 2 +- README.md | 80 +++++++++++++++++++++++++++------ commands/moderation/moveuser.js | 15 ++++--- handler/index.js | 2 +- index.js | 2 +- package.json | 3 +- 6 files changed, 80 insertions(+), 24 deletions(-) diff --git a/.env b/.env index 66eca1b..09204b0 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -token=yourDiscordBotToken \ No newline at end of file +token=yourtoken \ No newline at end of file diff --git a/README.md b/README.md index d9e5051..813614b 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,71 @@ -# User Friendly Discord BOT - WiP -a Discord BOT with User friendly commands, moderation commands and more! +# πŸ€– User-Friendly Discord Bot -### It's not 100% finished yet! +Welcome to the **User-Friendly Discord Bot**! 🌟 + +This bot is designed to enhance your Discord experience with easy-to-use commands, moderation tools, and more! Whether you're managing a community or just want some fun commands, this bot has you covered! + +### ✨ Features +- **πŸ› οΈ Moderation Commands:** Tools to help manage your server effectively. +- **πŸ‘₯ User-Friendly Commands:** Simple and intuitive commands for all users. +- **πŸ”” Custom Notifications:** Set reminders and alerts for important events. +- **🎨 Customizable Settings:** Tailor the bot's behavior to fit your server's needs. + +### πŸ’» Technologies +- **Node.js:** The backbone of the bot, providing a robust runtime environment. +- **Discord.js:** A powerful library for interacting with the Discord API. +- **dotenv:** For managing environment variables securely. +- **JavaScript:** The core language for logic and command handling. + +### 🎯 Purpose +This project was created to practice coding skills while providing a valuable tool for Discord communities. Feel free to explore, give feedback, or contribute! + +## πŸš€ About Me +πŸ‘‹ Hi there! I'm Noah Pombas, a 14-year-old aspiring developer and tech enthusiast from Switzerland. My journey into coding began with a curiosity about technology, which quickly evolved into a passion for creating and problem-solving. + +I’m currently diving into various programming languages and tools, with a strong interest in web development and bot creation. I love tackling new challenges and learning something new every day. + +On this GitHub, you'll find a collection of my projects, experiments, and contributions as I continue to grow my skills. Whether it's a web app or a Discord bot, I’m always looking to push my creative boundaries. + +When I'm not coding, you can find me exploring the outdoors, playing video games, or experimenting with new tech gadgets. + +Feel free to check out my projects, provide feedback, or connect with me at [noahpombas.ch](https://noahpombas.ch). I'm excited to be part of the coding community and can't wait to see where this journey takes me! + +πŸš€ Let’s build something amazing together! + +## πŸ”— Links +[![Check it out](https://img.shields.io/badge/Visit-Bot_Repo-blue?style=for-the-badge)](https://github.com/noahpombas-dev/User-Friendly-Discord-Bot) + +[![Portfolio](https://img.shields.io/badge/my_portfolio-000?style=for-the-badge&logo=ko-fi&logoColor=white)](https://noahpombas.ch/) + +## Support +Need help? Send an email to [info@noahpombas.ch](mailto:info@noahpombas.ch). + +## License +[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/) -## Instructions -- .env - - replace yourDiscordBotToken with your Token +## FAQ -
- -- handler/index.js - - replace yourDiscordServerID with your discord server ID - - Important: The Bot needs to be in the server! -
+#### Does it work without being hosted on a server? +No! You will need to run it on your local machine or a server to have it active in your Discord server. -- npm i (download all libraries) -- node index.js (to start the bot) +#### How do I add the bot to my Discord server? +To add the bot, you need to generate an invite link using your bot's client ID and the necessary permissions. You can find detailed instructions in the Discord Developer Portal. + +#### How can I report issues or request features? +You can report issues or suggest features by opening an issue on the GitHub repository. Please provide as much detail as possible! + +#### Is there a way to contribute to the bot? +Definitely! Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request. + +#### What if I encounter bugs? +If you find any bugs, please report them on the GitHub issues page. Include steps to reproduce the issue, and I'll do my best to address it. + +#### How often will the bot be updated? +Updates will be made regularly as new features are developed and bugs are fixed. Check the repository for the latest changes! + +#### Can I use this bot for multiple servers? +Yes! You can run multiple instances of the bot or use it in different servers by adding it to each one separately. + +#### Do I need any programming knowledge to use this bot? +Basic understanding of JavaScript and Node.js will help you set up and customize the bot, but the default features are ready to use out of the box. diff --git a/commands/moderation/moveuser.js b/commands/moderation/moveuser.js index 3586fe0..f5a3d5a 100644 --- a/commands/moderation/moveuser.js +++ b/commands/moderation/moveuser.js @@ -48,21 +48,24 @@ module.exports = { .setColor("Green") .setFooter({ text: `Member moved: ${member.user.username}`, iconURL: member.user.displayAvatarURL() }) .setTimestamp() - .setURL(`https://discord.com/channels/${interaction.guild.id}/${canalV.id}`) .setTitle("🧹 - Member Moved!") .setThumbnail(interaction.guild.iconURL({ dynamic: true, extension: 'png' })) - .setDescription("*βœ… - Member moved successfully!*") .setFields( { name: "πŸŽ™ - Voice Channel:", - value: `*${canalV}*`, + value: `*${channel}*`, inline: true }, { name: "πŸ†” - Voice Chanel ID:", - value: `*${canalV.id}*`, + value: `*${channel.id}*`, inline: true }, + { + name: " ", + value: ` `, + inline: false + }, { name: "πŸ‘€ - Moved Member:", value: `*${member}*`, @@ -78,8 +81,8 @@ module.exports = { await interaction.editReply({ embeds: [embedVoice] }) member.voice.setChannel(channel) - } catch { - interaction.editReply({ content: `**Error: Something didn't work...**`, ephemeral: true }) + } catch (err) { + interaction.editReply({ content: `**Error: Something didn't work...** ${err}`, ephemeral: true }) } diff --git a/handler/index.js b/handler/index.js index cba5afe..cd47078 100644 --- a/handler/index.js +++ b/handler/index.js @@ -54,7 +54,7 @@ const loadSlashCommands = async function (client) { } client.on("ready", async () => { - await client.guilds.cache.get("yourDiscordServerID").commands.set(slash); + await client.guilds.cache.get("serverid").commands.set(slash); }) } diff --git a/index.js b/index.js index 27db393..95945dd 100644 --- a/index.js +++ b/index.js @@ -11,4 +11,4 @@ client.slash = new Discord.Collection(); handler.loadEvents(client); handler.loadSlashCommands(client); -client.login(process.env.TOKEN); \ No newline at end of file +client.login(process.env.token); diff --git a/package.json b/package.json index ef7a059..8cbb88a 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@discordjs/voice": "^0.16.1", "chalk": "^4.1.2", "discord.js": "^14.12.1", - "dotenv": "^16.4.5" + "dotenv": "^16.4.5", + "nodemon": "^3.1.7" } }