Skip to content

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

Bitboy71960
Copy link

No description provided.

@Sitois
Copy link
Owner

Sitois commented May 19, 2025

Salut,
Peux-tu détailler les changement que tu as pu effectué stp ?

Comment on lines 3 to 5
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
Copy link

@Lenochxd Lenochxd May 19, 2025

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

Copy link
Author

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

Comment on lines +3 to +4
# Installer les dépendances nécessaires
pip install colorama requests pynacl python-dotenv aiohttp

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'

Copy link
Author

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

Comment on lines +6 to +21
# 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
Copy link

@Lenochxd Lenochxd May 19, 2025

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.

Copy link
Author

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

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

Comment on lines +23 to +44
# 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
Copy link

@Lenochxd Lenochxd May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. creating a python file from a .sh file is clearly not good practice.
  2. starting a server is useless and risky, please explain the purpose

Copy link
Author

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

Copy link
Owner

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...

Comment on lines +403 to +420
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...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. it's 100% chatgpt
  2. could be used as a backdoor

Copy link
Author

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

Copy link
Author

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 ?

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.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove your changes.

Copy link
Author

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

Copy link
Owner

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 !

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.

Copy link
Author

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à !

Copy link
Author

@Bitboy71960 Bitboy71960 May 21, 2025

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é

Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants