-
Notifications
You must be signed in to change notification settings - Fork 19
render update to work on linux #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
.env file added
Salut, |
discord.py-self No newline at end of file | ||
# Utiliser la version master de discord.py-self | ||
git+https://github.com/dolfies/discord.py-self.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the master branch instead of a release may be unstable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tout fonctionne très bien c'est pour render
# Installer les dépendances nécessaires | ||
pip install colorama requests pynacl python-dotenv aiohttp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add this to requirements.txt if this is really necessary using ; sys_platform == 'linux'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ça fonctionne Ceci est une adaptation pour render
# Télécharger la version correcte de discord.py-self depuis les releases de Nuclear-V2 | ||
echo "Téléchargement de la version compatible de discord.py-self..." | ||
mkdir -p ./discord_py_self_temp | ||
curl -L -o discord.py-self.zip https://github.com/Sitois/Nuclear-V2/releases/latest/download/discord.py-self.zip || { | ||
echo "Échec du téléchargement depuis les releases. Tentative alternative..." | ||
# Si le téléchargement échoue, essayer d'installer depuis le dépôt Git | ||
pip install git+https://github.com/dolfies/discord.py-self.git | ||
} | ||
|
||
if [ -f discord.py-self.zip ]; then | ||
unzip -o discord.py-self.zip -d ./discord_py_self_temp | ||
if [ -d ./discord_py_self_temp ]; then | ||
pip install -e ./discord_py_self_temp || echo "Échec de l'installation du package local" | ||
fi | ||
rm -rf discord.py-self.zip | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird behaviour, use requirements.txt
+ this will never work since discord.py-self is NOT provided by this repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cela fonctionne parfaitement sur render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"it works on my machine" aah
# Créer un petit serveur web pour satisfaire l'exigence de port de Render | ||
echo "Création d'un serveur web pour Render..." | ||
cat > webserver.py << 'EOF' | ||
import threading | ||
import http.server | ||
import socketserver | ||
import os | ||
|
||
def run_web_server(): | ||
PORT = int(os.getenv('PORT', 8080)) | ||
Handler = http.server.SimpleHTTPRequestHandler | ||
with socketserver.TCPServer(("", PORT), Handler) as httpd: | ||
print(f"Serving at port {PORT}") | ||
httpd.serve_forever() | ||
|
||
# Démarrer le serveur web dans un thread séparé | ||
threading.Thread(target=run_web_server, daemon=True).start() | ||
EOF | ||
|
||
# Lancer le selfbot avec le serveur web | ||
python -c "import webserver; webserver.run_web_server()" & | ||
python main.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- creating a python file from a .sh file is clearly not good practice.
- starting a server is useless and risky, please explain the purpose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour avoir le bot hébergé 24h/24 et 7j sur 7 avec utilisation avec mobile possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hein mais discord.py-self lui-même host déjà 😭😭
et comment ça utilisation mobile possible ? tu peux l'host sur pc et ça fonctionnera sur pc hein
et si tu veux dire plutôt lancer le self sur mobile, j'ai vu quelqu'un le faire et il a pas eu besoin de toucher au code...
import threading | ||
import http.server | ||
import socketserver | ||
import os | ||
|
||
def run_web_server(): | ||
PORT = int(os.getenv('PORT', 8080)) | ||
Handler = http.server.SimpleHTTPRequestHandler | ||
with socketserver.TCPServer(("", PORT), Handler) as httpd: | ||
print(f"Serving at port {PORT}") | ||
httpd.serve_forever() | ||
|
||
# Démarrer le serveur web dans un thread séparé | ||
if os.getenv('RENDER'): # Seulement sur Render | ||
threading.Thread(target=run_web_server, daemon=True).start() | ||
|
||
# Continuer avec le code existant... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- it's 100% chatgpt
- could be used as a backdoor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas chat gpt j'ai horreur de cette ia pourrie, la partie adaptation est Claude 3.7 sonnet et résolution des erreurs our que ca fonctionne c'est moi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ou voyez vous une porte dérobée ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas chat gpt j'ai horreur de cette ia pourrie, la partie adaptation est Claude 3.7 sonnet et résolution des erreurs our que ca fonctionne c'est moi
chatgpt is bad and claude too, don't use AI or at least use it well, gosh
"# Ajouter au début du fichier main.py
"
"# Continuer avec le code existant...
"
Also, you should speak English when contributing to open source projects, this helps non-French speakers understand you, it's also very good for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you understand the code you copy and paste from ai, importing libraries at the end of the file is bad practice, and opening a port is also really bad and unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove your changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi ? Ça fonctionne très bien avec render, pas de bug et j'utilise moi même cette version, qui m'est très utile, j'ai déjà expliqué que c'est une version pour render machine Linux et hébergeur gratuit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Après si tu veux ré-adapter Nuclear pour fonctionner sur Render, tu peux fork le repo et le modifier !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi ? Ça fonctionne très bien avec render, pas de bug et j'utilise moi même cette version, qui m'est très utile, j'ai déjà expliqué que c'est une version pour render machine Linux et hébergeur gratuit
This file itself is fine, but we cannot merge your configuration into the repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Après si tu veux ré-adapter Nuclear pour fonctionner sur Render, tu peux fork le repo et le modifier !
oui il est disponible sur mon github déjà !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi ? Ça fonctionne très bien avec render, pas de bug et j'utilise moi même cette version, qui m'est très utile, j'ai déjà expliqué que c'est une version pour render machine Linux et hébergeur gratuit
Ce fichier lui-même est correct, mais nous ne pouvons même pas fusionner votre configuration dans le référentiel.
d'ou vient l'erreur de la fusion du référentiel ?
update : okey je vois celà vient du shell que j'ai mis en place pour le lancement automatique du bot avec installation des dépendances pour que render fasse tout correctement oui effectivement ça peut etre dangereux mais comme c'est un fichier d'installation l'injection de code ne peut se faire que en cas de réinstallation donc oui c'est dangereux, mais je pense que si on supprime se shell ça modifie toute la particularité de render je travaillerai sur une methode plus sécurisé
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, by the way it's VERY risky to host selfbot on free hosts.
No description provided.