forked from irazasyed/telegram-bot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
131 additions
and
79 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,10 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented here. | ||
|
||
## [1.0.0] - 2024-11-26 | ||
### Added | ||
- Initial release of the Telegram Bot SDK. | ||
- Basic command support: `/start` and `/help`. | ||
- Middleware support for message handling. | ||
- Inline keyboard creation. |
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,12 @@ | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
We pledge to create a welcoming and inclusive environment for everyone. | ||
|
||
## Our Standards | ||
- Be respectful. | ||
- Provide constructive feedback. | ||
- Avoid inappropriate language or behavior. | ||
|
||
## Reporting Issues | ||
Report any issues to [support@marinamoda.com](mailto:support@marinamoda.com). |
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,34 @@ | ||
# Contributing to Telegram Bot SDK | ||
|
||
We’re excited to have you contribute! Follow these steps to make your contribution: | ||
|
||
## How to Contribute | ||
1. Fork the repository. | ||
2. Clone the forked repository: | ||
```bash | ||
git clone https://github.com/<your-username>/telegram-bot-sdk.git | ||
``` | ||
3. Create a new branch: | ||
```bash | ||
git checkout -b feature-name | ||
``` | ||
4. Make your changes and commit: | ||
```bash | ||
git add . | ||
git commit -m "Add feature description" | ||
``` | ||
5. Push to your fork: | ||
```bash | ||
git push origin feature-name | ||
``` | ||
6. Submit a Pull Request. | ||
|
||
## Code Standards | ||
- Use clear, descriptive commit messages. | ||
- Write comments for complex logic. | ||
- Run tests before submitting changes: | ||
```bash | ||
npm test | ||
``` | ||
|
||
Thank you for contributing! |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 MarinaModaMusicProd | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -1,85 +1,37 @@ | ||
[![Telegram Bot API PHP SDK](https://user-images.githubusercontent.com/1915268/75023827-7879f780-54be-11ea-98c1-436a14e7e633.png)][link-repo] | ||
|
||
<p align="center"> | ||
<a href="https://phpchat.co"><img src="https://img.shields.io/badge/Slack-PHP%20Chat-5c6aaa.svg?logo=slack&labelColor=4A154B&style=for-the-badge" alt="Join PHP Chat"/></a> | ||
<a href="https://t.me/PHPChatCo"><img src="https://img.shields.io/badge/Chat-on%20Telegram-2CA5E0.svg?logo=telegram&style=for-the-badge" alt="Chat on Telegram"/></a> | ||
<a href="https://github.com/irazasyed/telegram-bot-sdk/actions"><img src="https://img.shields.io/github/actions/workflow/status/irazasyed/telegram-bot-sdk/ci.yml?style=for-the-badge" alt="Build Status"/></a> | ||
<a href="https://github.com/irazasyed/telegram-bot-sdk/releases"><img src="https://img.shields.io/github/release/irazasyed/telegram-bot-sdk.svg?style=for-the-badge" alt="Latest Version"/></a> | ||
<a href="https://packagist.org/packages/irazasyed/telegram-bot-sdk"><img src="https://img.shields.io/packagist/dt/irazasyed/telegram-bot-sdk.svg?style=for-the-badge" alt="Total Downloads"/></a> | ||
</p> | ||
|
||
Telegram Bot API - PHP SDK | ||
========================== | ||
|
||
> Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. | ||
> | ||
> [Telegram Bot API][link-telegram-bot-api] is an HTTP-based interface created for developers keen on building bots for Telegram. | ||
> | ||
> To learn more about the Telegram Bot API, please consult the [Introduction to Bots][link-telegram-bot-api] and [Bot FAQ](https://core.telegram.org/bots/faq) on official Telegram site. | ||
> | ||
> To get started writing your bots using this SDK, Please refer the [documentation][link-docs]. | ||
## Supported Versions | ||
|
||
Only the latest released version of the SDK is supported. | ||
To facilitate upgrades, we rarely make backward-incompatible changes. | ||
|
||
| Version | Supported | Documentation | | ||
|---------|--------------------------------------|-----------------------| | ||
| 2.x | ❌ | ✅ [docs][link-v2-docs] | | ||
| 3.x | ✅ (current) | 🚧 [docs][link-v3-docs] | | ||
| 4.x | ✅ ([in development][link-new-repo]) | ❌ | | ||
# Telegram Bot SDK for MarinaModaMusicProd 🎵 | ||
|
||
The Telegram Bot SDK is designed to simplify the creation of bots with features tailored for music production and engagement. | ||
|
||
## Features | ||
- **Easy Integration**: Quick setup and deployment. | ||
- **Extensible Commands**: Add and manage bot commands easily. | ||
- **Music-Focused Tools**: Built for music producers and enthusiasts. | ||
- **Secure and Scalable**: Follows best practices for Telegram bot development. | ||
|
||
## Installation | ||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/MarinaModaMusicProd/telegram-bot-sdk.git | ||
cd telegram-bot-sdk | ||
``` | ||
2. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
3. Configure your bot in the `.env` file: | ||
```env | ||
TELEGRAM_BOT_TOKEN=your-telegram-bot-token | ||
``` | ||
4. Start the bot: | ||
```bash | ||
npm start | ||
``` | ||
|
||
## Documentation | ||
|
||
Documentation for the SDK can be found on the [website][link-docs]. | ||
|
||
## Are You Using Telegram Bot SDK? | ||
|
||
If you're using this SDK to build your Telegram Bots or have a project that's relevant to this SDK, We'd love to know and share it with the world. | ||
|
||
Head over to [Awesome Telegram Bots][link-awesome-telegram-bots] to share, discover, and learn more. | ||
|
||
## Additional information | ||
|
||
Any issues, feedback, suggestions or questions please use issue tracker [here][link-issues]. | ||
Visit the [Wiki](https://github.com/MarinaModaMusicProd/telegram-bot-sdk/wiki) for detailed guides. | ||
|
||
## Contributing | ||
|
||
Thank you for considering contributing to the project. Please review the [CONTRIBUTING](https://telegram-bot-sdk.readme.io/docs/contributing) guidelines before submitting any pull requests. | ||
|
||
## Credits | ||
|
||
- [Irfaq Syed][link-author] | ||
- [All Contributors][link-contributors] | ||
|
||
## Thanks | ||
|
||
Thanks to these companies for providing access to their products that have been very useful in developing this SDK. Please go check them out! | ||
|
||
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center;"> | ||
<a href="https://1password.com/?utm_source=telegram-bot-sdk"><img src="https://user-images.githubusercontent.com/1915268/80118353-e79ac780-85a5-11ea-9447-6be9090ca8de.png" alt="1Password" height="36"></a> | ||
<a href="https://www.jetbrains.com/?utm_source=telegram-bot-sdk"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_square.svg" alt="JetBrains" height="100"></a> | ||
</div> | ||
|
||
|
||
## Disclaimer | ||
|
||
This project and its author are neither associated nor affiliated with [Telegram](https://telegram.org/) in any way. | ||
Please see the [License][link-license] for more details. | ||
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for more details. | ||
|
||
## License | ||
|
||
This project is released under the [BSD 3-Clause][link-license] License. | ||
|
||
[link-author]: https://github.com/irazasyed | ||
[link-repo]: https://github.com/irazasyed/telegram-bot-sdk | ||
[link-new-repo]: https://github.com/telegram-bot-sdk/telegram-bot-sdk | ||
[link-issues]: https://github.com/irazasyed/telegram-bot-sdk/issues | ||
[link-contributors]: https://github.com/irazasyed/telegram-bot-sdk/contributors | ||
[link-docs]: https://telegram-bot-sdk.com/ | ||
[link-v2-docs]: https://telegram-bot-sdk.com/docs/2.x/ | ||
[link-v3-docs]: https://telegram-bot-sdk.com/ | ||
[link-license]: https://github.com/irazasyed/telegram-bot-sdk/blob/develop/LICENSE.md | ||
[link-telegram-bot-api]: https://core.telegram.org/bots | ||
[link-awesome-telegram-bots]: https://github.com/telegram-bot-sdk/awesome-telegram-bots | ||
This project is licensed under the [MIT License](LICENSE). |
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,23 @@ | ||
# Testing the Telegram Bot SDK | ||
|
||
### Running Tests | ||
To run tests: | ||
```bash | ||
npm test | ||
``` | ||
|
||
### Writing New Tests | ||
1. Add test cases in the `tests/` directory. | ||
2. Use [Mocha](https://mochajs.org/) and [Chai](https://www.chaijs.com/) for testing. | ||
|
||
Example Test: | ||
```javascript | ||
const { expect } = require('chai'); | ||
|
||
describe('Command: /start', () => { | ||
it('should respond with a welcome message', () => { | ||
// Test logic here | ||
expect(response.text).to.equal('Welcome to the bot!'); | ||
}); | ||
}); | ||
``` |