Dukefist Bot



Dukefist is a bot application for my Twitch channel's chatroom. It is written in C# and WPF using Visual Studio 2013, and I built it on top of the ChatSharp library. Its primary function is the "!strat" command, which randomly selects words from a predefined list and arranges them to mimic the kind of names people come up with for speedrun strategies. It also keeps a database of users who use the command and stores some data about the types of strats they've generated. The bot also serves some other basic functions, such as help commands, depending on what sort of streaming activities I'm doing.


Dukefist public command list


!strat algorithm:
    1/3 chance
        generate 1st random prefix
        1/3 chance
            generate 2nd random prefix
            IF 2nd prefix is contained in 1st prefix OR 1st prefix is contained in 2nd prefix
                 discard 2nd prefix
 
    generate 1st random infix
    IF no prefixes OR 3/5 chance
        generate 2nd random infix
        IF 2nd infix is contained in 1st infix OR 1st infix is contained in 2nd infix
            discard 2nd infix
 
    9/10 chance
        generate random suffix
    1/10 chance
        suffix = "strat"