From 1aa1bbadd4f832a15dd0eacf11519d0409324377 Mon Sep 17 00:00:00 2001 From: Jirayu Date: Wed, 2 Oct 2024 05:28:58 +0700 Subject: [PATCH] feat: some readme --- CODE_OF_CONDUCT.md | 36 +++++++++++++++++++++ CONTRIBUTING.md | 74 +++++++++++++++++++++++++++++++++++++++++++ README.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..aa6a071 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,36 @@ +# Code of Conduct + +## Introduction + +We are committed to fostering a welcoming and inclusive community for all contributors. This Code of Conduct outlines our expectations for participants and the consequences for unacceptable behavior. + +## Our Standards + +We expect all participants to: + +1. **Be Respectful**: Treat everyone with respect, regardless of their background, experience, or opinions. +2. **Be Inclusive**: Welcome diverse perspectives and experiences. Everyone should feel comfortable sharing their ideas. +3. **Be Constructive**: Provide feedback that is helpful, kind, and focused on improvement. Critique the work, not the person. +4. **Be Collaborative**: Work together to achieve common goals, and be open to others' contributions and suggestions. + +## Unacceptable Behavior + +Examples of unacceptable behavior include, but are not limited to: + +- Harassment, discrimination, or intimidation in any form. +- Offensive comments related to gender, sexual orientation, disability, physical appearance, body size, race, or religion. +- Disruption of discussions, such as excessive messaging or dominating conversations. +- Sharing personal information without consent. +- Engaging in any other behavior that is disrespectful or harmful. + +## Reporting Issues + +If you experience or witness unacceptable behavior, please report it to the project maintainers immediately. You can reach us at [jirayu.s@jirayu.net](mailto:jirayu.s@jirayu.net). All reports will be handled confidentially. + +## Consequences of Unacceptable Behavior + +Participants asked to stop any unacceptable behavior are expected to comply immediately. If a participant engages in unacceptable behavior, project maintainers may take any action they deem appropriate, including warning the offender or expelling them from the project. + +## Acknowledgment + +By participating in this project, you agree to abide by this Code of Conduct. We thank you for helping to create a positive and inclusive environment for everyone! diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..87dd975 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,74 @@ +# Contributing Guide + +Welcome to our project! We appreciate your interest in contributing. This guide will help you understand how to get started. + +## Table of Contents + +- [Contributing Guide](#contributing-guide) + - [Table of Contents](#table-of-contents) + - [Getting Started](#getting-started) + - [Code of Conduct](#code-of-conduct) + - [How to Contribute](#how-to-contribute) + - [Submitting Issues](#submitting-issues) + - [Submitting Code Changes](#submitting-code-changes) + - [Style Guide](#style-guide) + +## Getting Started + +1. **Fork the Repository**: Click the "Fork" button at the top right of this repository page to create a copy of the project in your GitHub account. +2. **Clone Your Fork**: Use the command below to clone your forked repository to your local machine: + + ```bash + git clone https://github.com/JirayuSrisawat-Github/melody.git + ``` + +3. **Install Dependencies**: Navigate to the project directory and install the required dependencies. Follow the instructions in the `README.md` file. + +## Code of Conduct + +We expect everyone to follow our [Code of Conduct](CODE_OF_CONDUCT.md) to ensure a welcoming and respectful community. + +## How to Contribute + +We welcome contributions of all kinds! You can help by: + +- Reporting bugs +- Suggesting new features +- Writing or improving documentation +- Fixing bugs or implementing features + +### Submitting Issues + +1. Check if the issue has already been reported. +2. If not, create a new issue with a clear title and description. +3. Provide steps to reproduce the issue if applicable. + +### Submitting Code Changes + +1. Create a new branch for your feature or bug fix: + + ```bash + git checkout -b feature/your-feature-name + ``` + +2. Make your changes and commit them with a descriptive message: + + ```bash + git commit -m "Add feature: your-feature-name" + ``` + +3. Push your changes to your fork: + + ```bash + git push origin feature/your-feature-name + ``` + +4. Open a Pull Request (PR) against the `main` branch of the original repository. Include a description of your changes and reference any related issues. + +## Style Guide + +Please follow our coding style guidelines for consistency: + +- Use tab for indentation. +- Write clear and descriptive commit messages. +- Ensure your code is well-commented and easy to understand. diff --git a/README.md b/README.md index e69de29..4eff875 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,78 @@ +# Melody + +Melody is an open-source music bot built with [NodeJS](https://nodejs.org/) and [TypeScript](https://www.typescriptlang.org/). It utilizes [Lavalink](https://github.com/lavalink-devs/Lavalink/) for audio streaming and [Sakulink](https://github.com/JirayuSrisawat-Github/sakulink) for handling YouTube links and other music-related functionalities. + +## Features + +- 🎶 Play music from various sources +- 🔊 Support for playlists +- 🎧 Real-time voice channel management +- 🎵 Easy integration with Discord.js and Sapphire +- 🌐 Open-source and actively maintained + +## Prerequisites + +Before you begin, ensure you have met the following requirements: + +- **Node.js** (version LTS or higher) +- **Lavalink server** (refer to [Lavalink setup guide](https://github.com/lavalink-devs/Lavalink#setup)) + +## Installation + +1. Clone the repository + + ```bash + git clone https://github.com/JirayuSrisawat-Github/melody.git + cd melody + ``` + +2. Install dependencies + + ```bash + npm install + ``` + +3. Config by put your token in [config.ts](https://github.com/JirayuSrisawat-Github/melody/blob/main/src/config.ts) + + ```ts + import { NodeOptions } from "sakulink"; + + export const token: string = "xxx"; + export const defaultSearchPlatform: string = "youtube music"; + export const defaultVolume: number = 75; + export const nodes: NodeOptions[] = [ + { + identifier: "Jirayu_V4", + host: "lavalink.jirayu.net", + port: 13592, + password: "youshallnotpass", + }, + ]; + ``` + +4. Build + + ```bash + npm run build + ``` + +5. Start your bot + + ```bash + npm run start + ``` + +## Usage + +- Invite the bot to your server using the OAuth2 URL generated in the Discord Developer Portal. +- Use commands to play, pause, skip, and manage your music queue. + +## Example Commands + +- `/play query:` - Play a song. +- `/stop` - Stop the music. +- `/skip` - Skip current song. + +## Contributing + +We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) for details on how to get started.