Code Monkey home page Code Monkey logo

Comments (14)

Mattie112 avatar Mattie112 commented on July 17, 2024

Hi there!

Thank you for looking at my bot. I did try to write a bit of a readme but as I'm still working on the bot I can agree it is not 100% up2date.

I myself run the docker version. For the windows/linux binary it should be enough to have a .env file in the same directory as the executable. Or you can make a .bat file like so:

set LOG_LEVEL=info
set DISCORD_TOKEN=xx
(etc)
factorigo-chat-bot.exe

I do want to expand the readme on how exactly to setup the discord bot but it should be roughly: https://discordpy.readthedocs.io/en/stable/discord.html

Do you already have the bot created? And the tokens? I might need to try and set it up from scratch myself :)

And with regards to the factorio server. Yes you need to set the rcon port / password. I use FactorioServerManager so I would need to look up the exact flags. I think it would be:

--rcon-port xxx
--rcon password xxx
--console-log /path/to/some/file

The console-log option will output the chat into a separate file. On Linux I had some issues if I didn't do this but it might work on Windows.

Please let me know what you find then I can expand the readme :) I'm not 100% if I have time tonight to try it out myself. If I do I'll let you know!

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

Fantastic, this should be plenty for me to work with.. thanks for the --clonsole-log bit, I'd completely missed that

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

This might also just be me, since I'm unfamiliar with GoLang, but it took me forever to realize the file should be named ".env" without anything infront of the extension.

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

Hopefully last question. Got the bot configured and added to Discord. Using this guide:
https://www.writebots.com/discord-bot-token/

Got everything running, and sucessfully tested a message from the factorio server to the discord channel.

However the other way around, whenever I type something into the discord channel, instead of it being displayed in the factorio server, I see this:
"274.628 Info RemoteCommandProcessor.cpp:249: New RCON connection from IP ADDR:({10.0.30.33:60996})"

Any Idea what I might be missing?

from factorigochatbot.

Mattie112 avatar Mattie112 commented on July 17, 2024

This might also just be me, since I'm unfamiliar with GoLang, but it took me forever to realize the file should be named ".env" without anything infront of the extension.

Yeah perhaps it would be clearer to name it 'config.txt' or something :) I'm used to having .env files so yeah :) I will see what I can do (with either expanding the README or changing it)

from factorigochatbot.

Mattie112 avatar Mattie112 commented on July 17, 2024

Hopefully last question. Got the bot configured and added to Discord. Using this guide: https://www.writebots.com/discord-bot-token/

Got everything running, and sucessfully tested a message from the factorio server to the discord channel.

However the other way around, whenever I type something into the discord channel, instead of it being displayed in the factorio server, I see this: "274.628 Info RemoteCommandProcessor.cpp:249: New RCON connection from IP ADDR:({10.0.30.33:60996})"

Any Idea what I might be missing?

image

Could you set LOG_LEVEL to debug? Just to get an better idea what the bot is doing.

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

Hm, looking at this, it actually looks like it's doing it right.

image

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

Maybe it is working I just cannot see it in the server console?

image

from factorigochatbot.

Mattie112 avatar Mattie112 commented on July 17, 2024

Hm that could be the case, not sure. I always tested it in the game.

I will also make an option to not use silent-command but the 'regular' message. That should not disable achievements (or so I was told) but will look a bit worse. (Always white in the form of "<server> ......")

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

Hm that could be the case, not sure. I always tested it in the game.

I will also make an option to not use silent-command but the 'regular' message. That should not disable achievements (or so I was told) but will look a bit worse. (Always white in the form of "<server> ......")

Makes sense, I'll test it ingame when I get home today.

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

Confirmed, works ingame no problem! Thanks mate, let me know if you need any help testing new features in the future.

from factorigochatbot.

Mattie112 avatar Mattie112 commented on July 17, 2024

Nice! I'll update the README in a bit with the new insights. If you have anything to add please let me know or create a PR. I'm still planning to fix somethings (like mentions are shown as @12309723497234 in Factorio). But if you have more suggestions let me know :). Did you also see the companion mod that adds support for stuff like deaths / research?

from factorigochatbot.

Mattie112 avatar Mattie112 commented on July 17, 2024

Hope I made it a bit clearer ;)

e5ae4cc

from factorigochatbot.

nielsrobin avatar nielsrobin commented on July 17, 2024

Hope I made it a bit clearer ;)

e5ae4cc

Looks great thanks and yes just installed the companion mod, so will be testing that tonight.

from factorigochatbot.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.