weidengeist / Willowbot

A chat bot intended to be used on Twitch
GNU General Public License v3.0
4 stars 0 forks source link

settings and correction of the bot code #12

Closed xlvlx closed 2 weeks ago

xlvlx commented 2 weeks ago

Good time of the day! Do you have the time and desire to fix your bot's code? Since I'm not a programmer myself and I don't understand much about it (I'm more of a tester with big needs), and I also don't know foreign languages, but I still want to launch your bot and use it completely for my streamer! the first error that I noticed when creating files, the bot creates three files "config.py " "config_tmp.py " and "logins.py "! As I understood the file itself "config.py " I don't need it because your bot's data with my token is there! (1 photo) Снимок экрана 2024-06-20 211953

second amendment, I found how to launch a bot on another streamer's channel by launching "main_cgi.py "! We need to add the command "'strimer' : 'nick_strimer'" to the file "config.py ": (2 photo) Снимок экрана 2024-06-20 213422

after that, in the file "basics.py " in line 181, replace "or CONFIG['strimer'].lower()" (3 photo) Снимок экрана 2024-06-20 213708

xlvlx commented 2 weeks ago

I also have a question: where should I create a file and "iamabot.py "to write a list of commands there so that the bot can read them?

weidengeist commented 2 weeks ago
  1. The file config_tmp.py must be a residue of having run the bot in a bugged version prior this commit. config_tmp.py is supposed to be renamed to config.py, which works flawlessly in my tests. This means that you can safely delete config_tmp.py.
  2. Please read the README carefully before using the bot. There is no need to modify the config file and add a streamer (correct spelling of strimer) key. Run the bot like this: python main_cli --channel anotherStreamer. This is documented here.
  3. The answer for your last question is also covered by the README:

    Besides a directory for the general Willowbot/IRC configuration, this program will create a subdirectory named commands in this configuration directory. This is where you have to put the command sets you want your bot to use.

Once again: Please note that issue discussions are not meant for talking about topcis already noted in the README.md or about suggested changes to the code unless those changes are needed to fix bugs, errors, or crashes. If you want to use Willowbot as a basis for your own bot and you want to modify certain parts, please create a fork of that project.

xlvlx commented 2 weeks ago
  1. Этот файл config_tmp.pyдолжен быть результатом запуска бота в версии с ошибкой

it's just that this file causes a connection error as it tries to connect to the streamer 'IAmYourFirstBot'

  1. Пожалуйста, внимательно прочитайте README перед использованием бота. Нет необходимости изменять файл конфигурации и добавлять ключ streamer(правильное написание strimer). Запустите бота следующим образом: python main_cli --channel anotherStreamer. Это задокументировано здесь .

it is inconvenient for me to launch the bot through the command, since after restarting the laptop, the bot will not be able to automatically reconnect to the channel.

  1. Ответ на ваш последний вопрос также содержится в README:

where exactly do I create this file and how do I connect to it?

Create a file called iamabot.py (as this is the channel where we want to do some tests; please note: Use small letters only!) where you can put your command checks and bot reactions.

Еще раз: обратите внимание, что обсуждения проблем не предназначены для обсуждения тем, уже отмеченных в README.md,

Please forgive me, I don't know much about Github.

weidengeist commented 2 weeks ago
  1. Which file do you mean? config_tmp.py? This file is never used by Willowbot except during the configuration phase. Furthermore, this file is never read, only written to.
  2. I don’t see any difference between starting Willowbot by python main_cli.py or python main_cli.py --channel anotherStreamer. Your problem with hibernating the PC and waking it up again will occur with the former as well as with the latter. You might want to create a desktop shortcut/launcher to start Willowbot with the --channel parameter.
  3. As you can read in the README.me, which I linked in my previous post and even quoted, you have to put the file in your commands directory which is a subdirectory of your Willowbot configuration directory (see your first screenshot). The file is used by launching Willowbot with the --channel option, which leads us to point 2 again.
xlvlx commented 2 weeks ago

простите меня, я сам не увидел что сделал фото с данной папкой и ищу её в другом каталоге! к сожалению создание ярлыков с параметрами я не умею, поэтому выкручиваюсь обычным перекодированием чужих кодов, Большое Вам спасибо, пойду производить тесты...