PhlexPlexico / G5-Bot

PUG Bot to use with G5API
GNU General Public License v3.0
10 stars 4 forks source link

[Question] STEAM ID integration to Get5-WEB? How does this work? #5

Closed mudkipmayukh closed 4 years ago

mudkipmayukh commented 4 years ago

Hey, hope you are having a great day. Does it require STEAM-ID integration? How does it connect to Get5-WEB and prepare the match without it? Does it disable get5 auth? Thanks!

PhlexPlexico commented 4 years ago

The only thing really needed is the database for Get5-Web. The bot takes care of creating the API key, setting the URL via Rcon, and then Get5 takes care of sending it's data back and forth to the database.

The match configured is a basic Best of 1 match, and there is no plans to change that. Vetoes are taken care of in Discord, and stored in the Get5-Web database under the veto table.

Currently, it does not disable get5_check_auths (and I've had problems with people joining), and it's still a problem I need to think through, since there's no way of verifying steam information based in discord....

Actually that's a lie (I think) and would be a good feature to suggest, I'm sure you could build a temporary match dictionary with the group of readied people, and get the steam IDs from their discord profiles.

Regardless. The only thing really needed at the end of the day is the database, as this bot does avoid using any of the panel calls (due to CSRF issues in forms), and then sends commands via Rcon to whichever server is first available in the game_server table.

mudkipmayukh commented 4 years ago

There are ways to completely do the login part in Discord but that would take a ton of time as well. As of now, best is using and building something before the veto, where all the players will need to provide their STEAM:ID in let's say, 64 format and also do a check when they provide in case they provide it wrong.

Like, the players will be DMed by the bot [the players have to have their DMs enabled], the bot will also print a message saying - A message has been sent in your DM. In the DM, players will be sharing their STEAM:IDs in let's say, 64 format and the bot checks if the steam ID is correct, gets the name of the profile and asks the player to confirm as well. After all the players have done this, the veto system starts.

This might take a bit to develop while I got another idea as of now.

So the following can be another way of doing it : The teams playing the scrims must have their team on the Get5 Panel. When the teams are made, they get an option to react to the team they are from [The team name comes from the Get5 Web Panel Database] and therefore there would be no need for STEAM ID auth in Discord.

Note : Thinking of this, this argument should also be there as a feature as the discord bot might not work properly without this. Argument > All the players [10 Max] have to select 2 teams, 5 first team and 5 another team. The argument will be if there is one discord user [we can take the IDs and match] reacting to 2 teams, then all the players will be notified that match could not be processed due to this. Another -> If 10 players in total choose 3 teams instead of 2, like let's say 4-4-2, then also the match will be cancelled. Another [last] > If 10 players choose in a format of 6-4/3-7 etc instead of 5-5, then also the match will be cancelled.

Might help you with this, I myself will try discord bot stuff, I am very newb at developing haha

PhlexPlexico commented 4 years ago

I've dabbled in reactions, but never really wanted to fully implement as users can type in chat and have the message disappear rather quickly. That's why I opted for messages. I know there was another person messaging me elsewhere that was working on reaction based vetoes and voting. I would prefer to keep it with chat based messages/commands.

As for the teams part - I would like to try to keep the bot as easy-to-use as possible with minimal setup on the WebPanel end. Most users (at least, in my use case) have their steam linked with discord, so it's not that hard to grab the Steam64 ID from then.

The point of this bot as well was to add in a simple 10man setup, hence why the teams in Get5Web may not work as easily. I wanted an easy setup for random 10mans with stat recording for our community.

I think it would be best to even modify the two public scrim teams each time a new match is created. That way it just updates the team blobs. That would be easiest I feel. I'll write up more on it later.

mudkipmayukh commented 4 years ago

I see, sorry if I am just being dumb but without STEAM ID integration, how is it locking the Steam accounts as you stated that auth is enabled as well. Kinda not going inside my brain haha :D

PhlexPlexico commented 4 years ago

As of right now it isn't. If you have an admin (or someone with map change privs, as per get5), they can enable get5_check_auths 1 right as the game is starting. However, this will prevent users from disconnecting and reconnecting.

mudkipmayukh commented 4 years ago

Thanks a ton for clearing this up. I was thinking auth was enabled from start, my bad haha. Also, great job on developing the web panel and now the discord bot as well!