Skip to content

Commit

Permalink
πŸ“š Update documents (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Srul1k authored Jul 30, 2023
1 parent f7b6fce commit 27be9dc
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 45 deletions.
88 changes: 43 additions & 45 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,65 @@
# TDPDNE.Telegram.Bot
![.NET build](https://github.com/cum-foundations/tdpdne-telegram-bot/actions/workflows/dotnet-build.yml/badge.svg) ![Docker image build](https://github.com/cum-foundations/tdpdne-telegram-bot/actions/workflows/docker-image-build.yml/badge.svg) ![Docker image publish](https://github.com/cum-foundations/tdpdne-telegram-bot/actions/workflows/docker-image-publish.yml/badge.svg) ![Latest Release](https://img.shields.io/github/release/cum-foundations/tdpdne-telegram-bot.svg?style=flat) ![Downloads](https://img.shields.io/github/downloads/cum-foundations/tdpdne-telegram-bot/total?color=blue&label=downloads) ![Visitor Badge](https://visitor-badge.feriirawann.repl.co?username=cum-foundations&repo=tdpdne-telegram-bot&color=blueviolet&style=for-the-badge&label=views&style=badge)

This is a simple bot for generating dickpics.

❗️ *Currently, the bot uses polling to receive updates from Telegram.
Also, due to the inability to have good hardware and as a result of generating new dickpics, [this](https://api.thisdickpicdoesnotexist.com) API is temporarily used to get them.*
<p align="center">
<img src="../res/logo.png"
height="148">
</p>

<p align="center">
<a alt=".NET build">
<img src="https://github.com/cum-foundations/tdpdne-telegram-bot/actions/workflows/dotnet-build.yml/badge.svg" /></a>
<a alt="Docker image build">
<img src="https://github.com/cum-foundations/tdpdne-telegram-bot/actions/workflows/docker-image-build.yml/badge.svg" /></a>
<a alt="Latest Release">
<img src="https://img.shields.io/github/release/cum-foundations/tdpdne-telegram-bot.svg?style=flat&label=Release" /></a>
</p>

<p align="center">
<a alt="Hits">
<img src="https://visitor-badge.feriirawann.repl.co?username=cum-foundations&repo=tdpdne-telegram-bot&color=salat&label=Hits&style=badge" /></a>
<a alt="Downloads">
<img src="https://img.shields.io/github/downloads/cum-foundations/tdpdne-telegram-bot/total?color=blue&label=Downloads" /></a>
<a href="https://t.me/cum_foundations">
<img src="https://img.shields.io/badge/C.U.M.%20News-2CA5E0?style=flat&logo=telegram&logoColor=white"
alt="Telegram channel"></a>
</p>

## This is a simple bot for generating dickpics.
</p>

<details>
<summary> 🎞️ Presentation</summary>
<summary> πŸ”” Notice</summary>

<br>

![Usage Example](../res/description-photo.gif)
- Currently, the bot uses **polling** to receive updates from Telegram.
- Due to the inability to have *good hardware* and as a result of generating new dickpics, [this](https://api.thisdickpicdoesnotexist.com) API is temporarily used to get them.

</details>

<details>
<summary> ▢️ How to use</summary>

<br>

To launch the bot, you need to:

1. ***Download*** the latest release

2. ***Update*** *appsettings.json*:
* `"BotToken": "{BOT_TOKEN}"`
Replace `{BOT_TOKEN}` with your personal one received from [BotFather](https://t.me/BotFather)
<summary> ▢️ How to run</summary>

* `"SupportContact": "{SUPPORT_CONTACT}"`
Replace `{SUPPORT_CONTACT}` with your contact information
- 🐳 [I'm familiar with Docker](how-to-run-with-docker.md)

* `"Donations": "{DONATIONS}"`
Replace `{DONATIONS}` with your donations details
- πŸ–₯️ [I don't know what Docker is](how-to-run-without-docker.md)

<br>
</details>

<details>
<summary> πŸ”§(Not necessarily)</summary>
<details>
<summary> 🎞️ Presentation</summary>

<br>
<br>

2.1 ***Update*** *WrapperConfiguration* section:
![Usage Example](../res/description-photo.gif)

* `TDPDNEApiUrl`
The URL of the API for getting dickpics ids.
* `TDPDNEImageStorageUrl`
The URL of the API for getting dickpics images.
* `MagickFuzzPercentage`
Magick.NET configuration. Adjust the fuzz value as appropriate. But if you make it too large, your image will be trimmed too much.
* `AttemptsMaxCount`
The number of attempts to get the correct id for a dickpic. After the failure, the message *"Service is temporarily unavailable"* will be displayed.
* `MinId`
Minimum limit for obtaining a valid id.
* `MaxId`
Maximum limit for obtaining a valid id.
</details>

</details>
<details>
<summary> πŸ’Έ Donations</summary>

3. ***Launch*** **TDPDNE.Telegram.Bot.exe** *(or publish a new file to run on your OS if it's not Windows x64 and then run it)*
<br>

4. ***Tell*** your friends that you love dicks
*If you are not burdened and would like to help us practice [escapism](https://en.wikipedia.org/wiki/Escapism), we would be grateful for donations:*

5. ***Enjoy!*** ✨
πŸ’Ž**Toncoin:** ```EQAq7lYMaMFPcnSvNe5V9XSPtaQy4J2YNMYArGRi3w-VrsuM```

</details>
34 changes: 34 additions & 0 deletions docs/how-to-configure-appsettings-json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# πŸ”§ How to configure *appsettings.json*

## BotConfiguration section

* `"BotToken": "{BOT_TOKEN}"`
Replace `{BOT_TOKEN}` with your personal one received from [BotFather](https://t.me/BotFather)

* `"Suppor": "{SUPPORT}"`
Replace `{SUPPORT}` with your contact information

* `"Donations": "{DONATIONS}"`
Replace `{DONATIONS}` with your donations details

## WrapperConfiguration section *(πŸ’‘ not necessary to update)*

* `TDPDNEApiUrl`
The URL of the API for getting dickpics ids.
* `TDPDNEImageStorageUrl`
The URL of the API for getting dickpics images.
* `MagickFuzzPercentage`
Magick.NET configuration. Adjust the fuzz value as appropriate. But if you make it too large, your image will be trimmed too much.
* `AttemptsMaxCount`
The number of attempts to get the correct id for a dickpic. After the failure, the message *"Service is temporarily unavailable"* will be displayed.
* `MinId`
Minimum limit for obtaining a valid id.
* `MaxId`
Maximum limit for obtaining a valid id.

## Serilog section

***See more:***

- [GitHub repository](https://github.com/serilog/serilog)
- [Official website](https://serilog.net/)
23 changes: 23 additions & 0 deletions docs/how-to-run-with-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 🐳 How to run with Docker

## ⏩ Quick start

1. ***Pull*** the latest image
```bash
docker pull ghcr.io/cum-foundations/tdpdne-telegram-bot
```

1.1 ***Tag*** pulled image with a convinient name
*(for example, this instruction will use ***tdpdne-telegram-bot*** image name)*

```bash
docker tag ghcr.io/cum-foundations/tdpdne-telegram-bot:latest tdpdne-telegram-bot
```
2. **Run** a new container
```bash
docker run -d -e BotConfiguration__Support="your-contact-information" -e BotConfiguration__BotToken="your-bot-token" -e BotConfiguration__Donations="your-donations-details" --name tdpdne-quick-start tdpdne-telegram-bot
```

3. ***Tell*** your friends that you love dicks

4. ***Enjoy!*** ✨
14 changes: 14 additions & 0 deletions docs/how-to-run-without-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# πŸ–₯️ How to run without Docker

To launch ***TDPDNE.Telegram.Bot***, you need:

1. ***Download*** the latest [release](https://github.com/cum-foundations/tdpdne-telegram-bot/releases)

2. ***Configure*** [appsettings.json](how-to-configure-appsettings-json.md)

3. ***Launch*** TDPDNE.Telegram.Bot.exe
*(or [publish](https://learn.microsoft.com/en-us/dotnet/core/tutorials/publishing-with-visual-studio?pivots=dotnet-6-0) a new file to run on your OS/architecture)*

4. ***Tell*** your friends that you love dicks

5. ***Enjoy!*** ✨
Binary file added res/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 27be9dc

Please sign in to comment.