Discord bot

Moderator: LIHL Staff

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Discord bot

Postby Diablo_ » Sun Mar 18, 2018 5:53 pm

Found a bug and fixed it.
")" in fijis name (and some other special characters) wasn't handled properly so he could sign whenever he wanted to.
Should work correctly now.
These users thanked the author Diablo_ for the post (total 3):
FadingSuns (Mon Mar 19, 2018 3:34 pm) • smokedope123 (Mon Mar 19, 2018 1:47 pm) • Vendeta (Sun Mar 18, 2018 6:30 pm)
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Discord bot

Postby Diablo_ » Sun Mar 18, 2018 6:50 pm

Update to compare:

you can now use it with only one name and it will use your own one as second one (thx to jamo for the idea).
e.g.
!compare ba_fail
would compare me and ba fail

protip: compare with yourself to see how many of your last games are tracked.
These users thanked the author Diablo_ for the post (total 2):
smokedope123 (Mon Mar 19, 2018 1:47 pm) • Jamo (Sun Mar 18, 2018 6:53 pm)
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

smokedope123
Forest Walker
Posts: 131
Joined: Mon Oct 05, 2015 6:17 pm
Location: Germany
Has thanked: 26 times
Been thanked: 16 times

Re: Discord bot

Postby smokedope123 » Mon Mar 19, 2018 1:49 pm

Diablo_ wrote:Found a bug and fixed it.
")" in fijis name (and some other special characters) wasn't handled properly so he could sign whenever he wanted to.
Should work correctly now.


@ZTX)Fiji @ZTX)Fiji @ZTX)Fiji @ZTX)Fiji @ZTX)Fiji @ZTX)Fiji

ahahahhaha I knew you were hacking motherfuckre xdddd

Mind
Donator
Posts: 174
Joined: Tue Sep 17, 2013 12:45 pm
Has thanked: 17 times
Been thanked: 11 times

Re: Discord bot

Postby Mind » Mon Mar 19, 2018 1:56 pm

this cant go unpunished. dia, do your job!!!! :)
(32:21 / All) Mudman: WE FORGOT KING
(32:23 / All) Mudman: gg

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Discord bot

Postby Diablo_ » Fri Apr 13, 2018 6:35 pm

@hazardous
@snowblind
@tom_hardy
@iamyoursenpai

Since the stats aren't recorded currently, games can now be recorded by LIHL mods via the discord bot. There are two commands:
!updatestats <gameid> <winner>
!reverseupdatestats <gameid> <winner>

e.g. for this game: https://entgaming.net/findstats.php?id=10596522

!updatestats 10596522 west:
Gives 15 elo to ilo and me and adds 1 win
Takes 15 elo from n1ll3 and artmas and adds 1 loss

!updatestats 10596522 east:
Gives 15 elo to n1ll3 and artmas and adds 1 win
Takes 15 elo from ilo and me and adds 1 loss

!reverseupdatestats 10596522 west:
Takes 15 elo from ilo and me and removes 1 win
Gives 15 elo to n1ll3 and artmas and removes 1 loss

!reverseupdatestats 10596522 east:
Takes 15 elo from n1ll3 and artmas and removes 1 win
Gives 15 elo to ilo and me and removes 1 loss


Normal usage:
Only use !updatestats <gameid> <winner> exactly once.
!reverseupdatestats is only there to fix wrong usage (e.g. updating stats for the same game twice, updating stats for a game which was drawn etc.)

Normal bot response:
[20:20] BOTSystem: Diablo_ updating stats for game ID: 10596522 with winner: east
[20:20] BOTSystem: Updated Elo/wins/losses for player [artmas]: 15/1/0
[20:20] BOTSystem: Updated Elo/wins/losses for player [diablo_]: -15/0/1
[20:20] BOTSystem: Updated Elo/wins/losses for player [ilocos_norte]: -15/0/1
[20:20] BOTSystem: Updated Elo/wins/losses for player [n1ll3]: 15/1/0


Note that both commands can be used multiple times and have no knowledge of each other, i.e. you can use !reverseupdatestats on a game which wasn't even updated before (of course you shouldn't do that).
Also note that usage of the command is logged so any abuse can be easily detected (we will check for it regularly).

I tried to make it as fool proof as possible and I hope everything is clear, if not just hit me up.

Now you just need to:
1) decide if and if so starting with which time you want to update stats
2) find out which team has won when updating the stats: since stats aren't recorded there's also nowhere visible which team has won and replays are also not available. This means you will need players to tell you who won (e.g. make a thread where people have to post the game id + winner team)
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

FadingSuns
Treant Protector
Posts: 947
Joined: Wed Oct 22, 2014 10:38 am
Has thanked: 28 times
Been thanked: 113 times

Re: Discord bot

Postby FadingSuns » Fri Apr 13, 2018 7:06 pm

i appreciate that work diablo bit seems like a mess and a lot extra work for mods... Cant we live without elo until stable solution is found?.

Rather than having 1000 topics posted for mods to manual process this... idk

inQ
Forest Walker
Posts: 211
Joined: Thu Jul 09, 2015 1:24 pm
Has thanked: 54 times
Been thanked: 19 times

Re: Discord bot

Postby inQ » Fri May 11, 2018 12:54 am

@diablo

Any way to reset !compare function for the new season? Or are going to keep it rolling?

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Discord bot

Postby Diablo_ » Fri May 11, 2018 12:43 pm

inQ wrote:@diablo

Any way to reset !compare function for the new season? Or are going to keep it rolling?


It is just fetching all saved game data from the Ent database which (currently) always is a sliding window of ~3 months. I can't really make it to show the current season only, but what would be an option is to allow players to specify how many days should be considered.

i.e.
!compare a b -> compare with all saved games
!compare a b 20 -> compare with saved games of the past 20 days only

Do you think that would be useful?
These users thanked the author Diablo_ for the post:
inQ (Sat May 12, 2018 1:08 pm)
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

inQ
Forest Walker
Posts: 211
Joined: Thu Jul 09, 2015 1:24 pm
Has thanked: 54 times
Been thanked: 19 times

Re: Discord bot

Postby inQ » Sat May 12, 2018 1:10 pm

Diablo_ wrote:
inQ wrote:@diablo

Any way to reset !compare function for the new season? Or are going to keep it rolling?


It is just fetching all saved game data from the Ent database which (currently) always is a sliding window of ~3 months. I can't really make it to show the current season only, but what would be an option is to allow players to specify how many days should be considered.

i.e.
!compare a b -> compare with all saved games
!compare a b 20 -> compare with saved games of the past 20 days only

Do you think that would be useful?


Appreciate it Dia but I don't think that would be necessary unless people want it. I just thought compare function was a fun way to gauge chemistry with certain players during a particular season but no need for you to write new codes for it. Thanks for the hard work as usual.

smokedope123
Forest Walker
Posts: 131
Joined: Mon Oct 05, 2015 6:17 pm
Location: Germany
Has thanked: 26 times
Been thanked: 16 times

Re: Discord bot

Postby smokedope123 » Sun Jun 10, 2018 1:59 pm

please implement !challenge

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Discord bot

Postby Diablo_ » Wed Jun 13, 2018 3:03 pm

Added challenge mode.

!challenge x (=4vs4)
!challenge2 x
!challenge3 x
!challenge4 x

!accept

!sign
!sign
!sign
...

!pick a
!pick b
!pick c
...

Pick mode is 1-2-2-2-1, the first picker is random. Game gets canceled after 1 minute of inactivity (i.e. 1 min no accept = cancel, 1 min no sign = cancel, 1 min no pick = cancel). If the challenger or the challengee unsigns the game also gets canceled. Games are hosted as lihlc..., so they are 15/15 Elo games.

If you notice any problems or have suggestions pm me.
Last edited by Diablo_ on Wed Jun 13, 2018 7:37 pm, edited 2 times in total.
These users thanked the author Diablo_ for the post (total 5):
smokedope123 (Fri Jun 15, 2018 7:25 am) • 7years (Thu Jun 14, 2018 8:16 pm) • inQ (Thu Jun 14, 2018 2:07 am) • Crey (Wed Jun 13, 2018 6:06 pm) • Jamo (Wed Jun 13, 2018 3:07 pm)
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

User avatar
Jamo
Treant
Posts: 460
Joined: Thu Dec 04, 2014 10:57 pm
Has thanked: 121 times
Been thanked: 66 times

Re: Discord bot

Postby Jamo » Wed Jun 13, 2018 3:07 pm

Dude, that's greeeaaattt!!

User avatar
Jamo
Treant
Posts: 460
Joined: Thu Dec 04, 2014 10:57 pm
Has thanked: 121 times
Been thanked: 66 times

Re: Discord bot

Postby Jamo » Wed Jun 13, 2018 6:27 pm

How does it work though? Others should have to sign first somehow?

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Discord bot

Postby Diablo_ » Wed Jun 13, 2018 7:37 pm

Forgot to show the sign part :P

!challenge x (=4vs4)
!challenge2 x
!challenge3 x
!challenge4 x

!accept

!sign
!sign
!sign
...

!pick a
!pick b
!pick c
...
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

smokedope123
Forest Walker
Posts: 131
Joined: Mon Oct 05, 2015 6:17 pm
Location: Germany
Has thanked: 26 times
Been thanked: 16 times

Re: Discord bot

Postby smokedope123 » Fri Jun 15, 2018 7:28 am

Thanks for the great job and your effort here @Diablo_ !

Just a suggestion on the timers... I agree to 1min accept timer, but shouldn't the other timers be increased to at least 3 min or so?
I'm sure like this the games would be cancelled unintentionally occasionally due to people being slow at deciding who to pick i.e.


Return to “LIHL Archive”

Who is online

Users browsing this forum: No registered users and 19 guests