jelliedpizza / RoleBot

An open source bot whose sole purpose is role management
GNU Affero General Public License v3.0
27 stars 10 forks source link

Can't run the bot on Windows 10? #3

Open xXEpochXx opened 6 years ago

xXEpochXx commented 6 years ago

I'm on Windows 10 and I use the discord .exe software. I installed the python 3.6 and the Git software.

I used the Git software to download bot/code/repertory from Github. Then I created the API and configured the "config.py". Then I tried to launch the "brain.py" multiple ways.

I tried to run the "brain.py" with the git or CMD, Python 3.6, Git and it just closes and doesn't give me any links? it just either closes or if I run the bat or ch file it gives me an error. I tried with and without my VPN and still doesn't work. it seems to be due to it not findind something "ModuleNotFoundError: No module named 'discord'"

Pinging DESKTOP-***[::1] with 32 bytes of data: Reply from ::1: time<1ms

Ping statistics for ::1: Packets: Sent = 1, Received = 1, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms Traceback (most recent call last): File "brain.py", line 1, in import discord ModuleNotFoundError: No module named 'discord' Program terminated at Mon 01/15/2018 2:50:15.12 with Error 1 Press Ctrl-C if you don't want to restart automatically

Pinging DESKTOP-**[::1] with 32 bytes of data: Reply from ::1: time<1ms

Ping statistics for ::1: Packets: Sent = 1, Received = 1, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms Traceback (most recent call last): File "brain.py", line 1, in import discord ModuleNotFoundError: No module named 'discord'

I tried everything to run the bot it doesn't want to run and can't seem to host it myself? I found a way to invite the bot manually to my discord server but it appears offline.

xXEpochXx commented 6 years ago

I just found that switching the beginning from another bot in "brain.py" it seems to try start with a "run.bat" from another bot but still give me an error.

Changing the beginning of brain.py with

from __future__ import print_function

import os
import sys
import time
import logging
import tempfile
import traceback
import subprocess

Stop the missing discord error but still doen't launch. Then running the brain.py with bat from another bot.

@ECHO off

CHCP 65001 > NUL
CD /d "%~dp0"

SETLOCAL ENABLEEXTENSIONS
SET KEY_NAME="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
SET VALUE_NAME=HideFileExt

FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (
    SET ValueName=%%A
    SET ValueType=%%B
    SET ValueValue=%%C
)

IF x%ValueValue:0x0=%==x%ValueValue% (
    ECHO Unhiding file extensions...
    START CMD /c REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f
)
ENDLOCAL

IF EXIST %SYSTEMROOT%\py.exe (
    CMD /k %SYSTEMROOT%\py.exe brain.py
    EXIT
)

python --version > NUL 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO nopython

CMD /k python brain.py
GOTO end

:nopython
ECHO ERROR: Python has either not been installed or not added to your PATH.

:end
PAUSE

But still doesn't work.... won't launch

xXEpochXx commented 6 years ago

Never mind I'm blind I didn't see "[Watch out! This build is broken, I'm working on a new one!]"

Jiffy1891 commented 6 years ago

DId you check Enable PATH when installing python 3.6?