Skip to content

Commit 1073b15

Browse files
committed
v2.4.0
- Added Ruff formatting rules - Added pyproject.toml - Added 1 GB max size limit for Litterbox - Migrated to uv package manager - General fixes - I/O Operations inside async functions now are async instead of sync
1 parent 97f896d commit 1073b15

20 files changed

Lines changed: 2062 additions & 190 deletions

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/.env
22
/.venv
3-
/__pycache__
4-
src/__pycache__/
3+
__pycache__
54
/clips
65
/todo.txt
76
old_files.txt

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

README.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,74 @@
11
# Auto Send New Files Discord
2-
Do you want to automatically send new files from a directory of your computer to a Discord Webhook? Well now you can with this code. Don't worry anymore about taking the time to search the file and sending it manually. This code will automatically do it for you.
2+
3+
Do you want to automatically send new files from a directory of your computer to a Discord Webhook?
4+
Well now you can with this code. Don't worry anymore about taking the time to search the file and sending it manually.
5+
This code will automatically do it for you.
36

47
![](assets/discordExample.png)
8+
59
> [!NOTE]
610
> Now Selfbot is available too.
711
812
## Official Releases
13+
914
### You can download the latest official release [here](https://github.com/Benjas333/AutoSendNewFilesDiscord/releases/latest/).
1015

1116
![](assets/terminalExample.png)
17+
1218
> [!CAUTION]
1319
> I don't know if it works properly in other operating systems than Windows.
1420
1521
## Cloning repo
22+
1623
### Getting Started
24+
1725
[Python 3.12](https://www.python.org/downloads/) recommended.
1826
[Discord](https://discord.com/) lol.
1927

2028
### Clone this project
29+
2130
```
2231
git clone https://github.com/Benjas333/AutoSendNewFilesDiscord
2332
cd AutoSendNewFilesDiscord
2433
```
2534

2635
### Install dependencies
36+
2737
```
2838
pip install -r requirements.txt
2939
```
3040

3141
### Configure the .env file
42+
3243
- Change the content of `example.env`.
3344
- Rename it to `.env`.
3445

3546
## Usage
47+
3648
### Command line method
49+
3750
**`.env` file required.**
3851

3952
#### Webhook
53+
4054
```
4155
python webhook.py
4256
```
4357

4458
#### Selfbot
59+
4560
```
4661
python selfbot.py
4762
```
63+
4864
To use the selfbot you must provide your account token in the `.env` file.
4965

5066
`Ctrl + C` to stop the scripts.
5167

5268
### Import method
69+
5370
#### Webhook
71+
5472
```python
5573
# Import script
5674
from webhook import Webhook
@@ -67,6 +85,7 @@ webhook.loop()
6785
```
6886

6987
#### Selfbot
88+
7089
```python
7190
# Import script
7291
from selfbot import Selfbot
@@ -80,15 +99,37 @@ client = Selfbot(
8099
)
81100
client.run(token="YOUR TOKEN HERE")
82101
```
102+
83103
> [!IMPORTANT]
84104
> If you want to use the `.env` file with the importing methods, you just need to make `import config`.
85105
86106
## TO DO
107+
87108
- [x] Find an optimized way to send big files quickly. Solution: Litterbox
88109
- [ ] Add a GUI.
89110
- [ ] Add system tray support.
90111

91-
## Changelog
112+
# Changelog
113+
114+
## 2026-04-12
115+
116+
### Added
117+
118+
- Added Ruff formatting rules.
119+
- Added pyproject.toml.
120+
- Added 1 GB max size limit for Litterbox.
121+
122+
### Changed
123+
124+
- Migrated to uv package manager.
125+
126+
### Fixed
127+
128+
- General fixes.
129+
- I/O Operations inside async functions now are async instead of sync.
130+
131+
## I don't remember
132+
92133
- Added litterbox implementation
93134
- Added updater for the executable releases.
94135
- Added lazy try of rate limit support for Selfbot mode.
@@ -99,11 +140,13 @@ client.run(token="YOUR TOKEN HERE")
99140
- Added multiple Discord channels implementation for importing methods.
100141
- Added seconds argument (default: 1).
101142
- Added Webhook class in `webhook.py`.
102-
- Added create `old_clips.txt` functionality if the file does not exist.
143+
- Added create `old_clips.txt` functionality if the file does not exist.
103144
- Added [releases](https://github.com/Benjas333/AutoSendNewFilesDiscord/releases) for people not so familiar with programming in general.
104145

105146
## Contributing
147+
106148
Any contribution would be appreciated.
107149

108150
## Links
151+
109152
[Twitter](https://twitter.com/ElBenjas333)

justfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
set shell := ["powershell.exe", "-c"]
2+
3+
version := `taplo get -f pyproject.toml project.version`
4+
name := `taplo get -f pyproject.toml project.name`
5+
os_name := os()
6+
7+
alias help := default
8+
9+
# Print this message
10+
default:
11+
@just --list
12+
13+
# Debug project info
14+
[group("Debug")]
15+
info:
16+
@echo "=== Project Info ==="
17+
@echo "Name: {{ name }}"
18+
@echo "Version: {{ version }}"
19+
@echo "OS: {{ os_name }}"
20+
21+
# Build the binary
22+
[group("Release")]
23+
build: info
24+
uv run pyinstaller -F --specpath specs -n {{ name }}-v{{ version }}-{{ os_name }} app.py

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[project]
2+
name = "AutoSendNewFilesDiscord"
3+
authors = [{ name = "Benjas333" }]
4+
version = "2.4.0"
5+
description = "Script that automatically sends new files from a directory to Discord"
6+
readme = "README.md"
7+
requires-python = ">=3.12"
8+
dependencies = [
9+
"aiohttp>=3.13.5",
10+
"discord-py-self>=2.0.0",
11+
"discord-webhook>=1.3.1",
12+
"orjson>=3.11.8",
13+
"python-dotenv>=1.0.1",
14+
"requests>=2.32.3",
15+
"trio>=0.33.0",
16+
]
17+
18+
[dependency-groups]
19+
dev = [
20+
"colorama>=0.4.6",
21+
"inputwhile>=1.0.2",
22+
"pycryptodome>=3.23.0",
23+
"pyinstaller>=6.19.0",
24+
"pywin32>=311",
25+
"setuptools>=82.0.1",
26+
]

requirements.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

ruff.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
line-length = 125
3+
indent-width = 8
4+
5+
[lint]
6+
select = [
7+
"E",
8+
"F",
9+
"UP",
10+
"B",
11+
"SIM",
12+
"I",
13+
"ANN",
14+
"ASYNC",
15+
"BLE",
16+
"FBT",
17+
"A",
18+
"C4",
19+
"FA",
20+
# "CPY",
21+
"ISC",
22+
"ICN",
23+
"G",
24+
"INP",
25+
"RET",
26+
"SLF",
27+
"TID252",
28+
"TC",
29+
"C90",
30+
"N",
31+
"PERF",
32+
"W",
33+
"RUF",
34+
]
35+
ignore = ["E117", "SIM105", "RUF001", "RUF002", "RUF003"]
36+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
37+
preview = true
38+
39+
[lint.per-file-ignores]
40+
"scripts/**.py" = ["INP001"]
41+
"**/tests/**.py" = ["ANN201"]
42+
43+
[pep8-naming]
44+
extend-ignore-names = ["*Exception"]
45+
46+
[format]
47+
indent-style = "space"
48+
line-ending = "auto"

scripts/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)