AGuyNamedJens / FactorioChatBot

Two-Directional chat bot connecting Discord and Factorio chats together, written in nodejs.
MIT License
13 stars 9 forks source link

No 'fancy' discord messages setting #4

Closed Mattie112 closed 2 years ago

Mattie112 commented 2 years ago

Hi,

I don't like that the bots removes discord messages and re-posts it with a chat-balloon. I much more prefer discord to stay intact. I can easily comment line 98/99 to achieve this. Can we turn this into a setting? Or is there a specific reason why you did this? My Factorio channel is also used just for talking (and having no players in the server) so that's really the reason.

AGuyNamedJens commented 2 years ago

Hi,

I could make it an option, sure thing. There's no specific reason I did it except for not knowing others would actually use it. I'll have to rewrite the core in the future as well.

Mattie112 commented 2 years ago

Nice! For now I simply remove those 2 lines in my Dockerfile but a setting would be nice :)

I was looking for a Factorio discord bot and a couple of places referred to here. I think it is great to link Factorio and Discord together then you can see who is active a bit easier :)

(for example: https://github.com/Corbris/FactorioChatBot https://mods.factorio.com/mod/PSiChatUtil)

edit: I'm happy to submit a PR if you want

AGuyNamedJens commented 2 years ago

Yep, I'll create a setting for it soon, when I have time.

I'll have to do quite a lot of rewrites in the near future. (one of the people who forked changed the README for example)

Wait, that's actually interesting, people are referring to this repository? I based my bot on Cobris's FactorioChatBot since in the first place, I wanted/needed new features on it, without mods, with optional achievement feature etc.. Looks like they for some reason started referring here as well. Didn't expect that, lol.

You're free to do PR's

Mattie112 commented 2 years ago

Well it looks like your bot was chosen :) I just needed a bot found a couple and they pointed to here so that's why I started using yours :)

I'm thinking of making a go version that perhaps integrates a bit better but no idea when I have time to start on that. I will check tonight if I can make a small PR for this (and if needed the docker one as well). Just so I have a bot that at least does most things I want. Stuff like achievements / alert when research is done etc would be nice but chat is most important :)

AGuyNamedJens commented 2 years ago

That's nice to hear :)

I don't think research is available with logs, if it is i'll definitely add it. Will inspect that case as well. I've went ahead and added a dockerfile, i'll add the setting and more log features in the coming hour or so, testing will be later today or tomorrow.

AGuyNamedJens commented 2 years ago

Just so I have a bot that at least does most things I want. Stuff like achievements / alert when research is done etc would be nice but chat is most important :)

I've found a way to do this, actually. It does require manual save editing however, The user would need to add custom events for this in control.lua which is located in the save file.

They would be adding a line like so: script.on_event(defines.events.on_rocket_launched, function(event) print("A rocket was launched") end) I'll test it soon on my own factorio server, if it works this means i'll add support for those functions, with a simple guide on adding support for it on their own saves.

Check #6 please

Mattie112 commented 2 years ago

Hm that's interesting! I was also thinking of having a small companion mod that allows for extra things to be logged / send to the bot (perhaps the bot can receive input on a port or something). But that would exclude people playing vanilla of course.

Mattie112 commented 2 years ago

https://github.com/AGuyNamedJens/FactorioChatBot/pull/8

AGuyNamedJens commented 2 years ago

@Mattie112 Could you check #6 and help me with it? I'm trying to find the best way possible to add more custom events without using mods, since my original plan doesn't seem to work without adding more parameters to the startup command.

Mattie112 commented 2 years ago

Yes I will take a look this evening!

Mattie112 commented 2 years ago

As you have implemented this I'm gonna close this issue :)