def populate_config(self, yaml_conf): """Populates a new config with user input via commandline :param yaml_conf: An example config to replace values of :return: A populated config """ yaml_conf["firsttime"] = False enabled = input("\nNow we will set up Sidney. Enter 'True' or 'False' to enable/disable sidneybot farming: ") enabled = utils.string_to_bool(enabled) yaml_conf["enabled"] = enabled if not enabled: print("Sidneybot farming disabled.") return yaml_conf work = input("\nEnter 'True' or 'False' to enable/disable work farming: ") work = utils.string_to_bool(work) yaml_conf["workfarming"] = work print("\nNow configure the interval at which work will be farmed, called delay.") delay = int(input("Enter the interval in seconds: ")) yaml_conf["delay"] = int(delay) print("\nFinally, configure the channel to farm work in.") channel = input("Enter the id of the channel: ") yaml_conf["channel"] = int(channel) return yaml_conf
def populate_config(self, yaml_conf): """Populates a new config with user input via commandline :param yaml_conf: An example config to replace values of :return: A populated config """ yaml_conf['firsttime'] = False print( "\nIt appears you haven't configured pokecord farming yet. You can do so now or manually later." ) enabled = input( "Enter 'True' to enable pokecord farming and configure now, or 'False' for the opposite: " ) yaml_conf["enabled"] = utils.string_to_bool(enabled) if not enabled: print("\nPokecord farming disabled.") return yaml_conf autocatch = input( "\nEnter 'True' or 'False' to enable/disable auto catching: ") yaml_conf["autocatch"] = utils.string_to_bool(autocatch) autorelease = input( "\nEnter 'True' or 'False' to enable/disable auto releasing based on IV%: " ) yaml_conf["autorelease"] = utils.string_to_bool(autorelease) if autorelease: minimumiv = input( "\nEnter the minimum IV% for incoming pokemon (Without the %): " ) yaml_conf["minimumiv"] = int(minimumiv) print( "\nNext, configure the autocatch delay. This is the delay between a pokemon appearing and when the bot catches it." ) print( "This can make the bot appear more legit since it's not immediately catching them." ) autocatchdelay = input("Enter the delay, in seconds, for autocatch: ") yaml_conf["autocatchdelay"] = int(autocatchdelay) channels = [] channels.append(int(input("\nEnter the channel id to farm in: "))) yaml_conf["channels"] = channels prefixes = {} prefix = input( "Enter the prefix for pokecord in that channel (default is p!): ") prefixes[channels[0]] = prefix yaml_conf["prefixes"] = prefixes return yaml_conf
def populate_config(self, yaml_conf): """Populates a new config with user input via commandline :param yaml_conf: An example config to replace values of :return: A populated config """ yaml_conf["firsttime"] = False print( "\nIt looks like you haven't configured options for sushiibot yet. You can do that now or manually later." ) repfarming = input( "The first option is to farm rep from sushiibot. Enter 'True' or 'False' regarding whether or not to farm sushii rep: " ) repfarming = utils.string_to_bool(repfarming) yaml_conf["repfarming"] = repfarming fishyfarming = input( "\nNow you can choose to farm fishies or not. Enter 'True' or 'False' to farm fishies: " ) fishyfarming = utils.string_to_bool(fishyfarming) yaml_conf["fishyfarming"] = fishyfarming if not repfarming and not fishyfarming: print("\nAll sushiibot related farming is disabled.") return yaml_conf channel = input( "Enter the channel id to farm sushii rep and fishies: ") yaml_conf["channel"] = int(channel) repdelay = input( "\nNow enter the interval, in seconds, at which rep will be farmed: " ) yaml_conf["repdelay"] = int(repdelay) fishydelay = input( "\nNow enter the interval, in seconds, to farm fishies: ") yaml_conf["fishydelay"] = int(fishydelay) reprecipients = [] print( "\nThe next option is who to farm sushii rep for. You can manually configure multiple recipients later." ) reprecipients.append( int(input("Enter the id of the user to farm rep for: "))) yaml_conf["reprecipients"] = reprecipients fishyrecipients = [] print( "\nFinally, configure who to farm sushii fishies for. You can manually configure multiple recipients later." ) fishyrecipients.append( int(input("Enter the id of the user to farm fishies for: "))) yaml_conf["fishyrecipients"] = fishyrecipients return yaml_conf
def populate_config(self, yaml_conf): """Populates a new config with user input via commandline :param yaml_conf: An example config to replace values of :return: A populated config """ yaml_conf["firsttime"] = False print( "\nNow we will set up Tatsumaki. If you would like to disable rep farming or configure it later, enter 'False' below." ) recipient = input( "However, if you would like to enable it, enter the id of the user you want to farm rep for: " ) recipient = utils.string_to_bool(recipient) if not recipient: print("\nRep farming has been disabled.") yaml_conf["repfarming"] = recipient return yaml_conf recipients = [] recipients.append(recipient) yaml_conf["recipients"] = int(recipients) print("\nThe next configuration option is called silence.") print( "Enter a number to remove farming messages after that amount in seconds." ) print( "You can manually configure DAB later to delete messages after a random amount of time (See Documentation)" ) silent = input("Enter a number or 'False' to disable silence: ") silent = utils.string_to_bool(silent) # If user didn"t disable silence, convert it to integer if not isinstance(silent, bool): silent = int(silent) yaml_conf["silent"] = silent print( "\nNow configure the interval at which rep will be farmed, called delay." ) delay = int(input("Enter the interval in seconds: ")) yaml_conf["delay"] = int(delay) print("\nFinally, configure the channel to farm rep in.") channel = input("Enter the id of the channel: ") yaml_conf["channel"] = int(channel) return yaml_conf
def populate_config(self, yaml_conf): """Populates a new config with user input via commandline :param yaml_conf: An example config to replace values of :return: A populated config """ yaml_conf["firsttime"] = False print( "\nNow we will set up Tatsumaki. If you would like to disable rep farming or configure it later, enter 'False' below." ) recipient = input( "However, if you would like to enable it, enter the id of the user you want to farm rep for: " ) recipient = utils.string_to_bool(recipient) if not recipient: print("\nRep farming has been disabled.") yaml_conf["repfarming"] = recipient return yaml_conf recipients = [] recipients.append(int(recipient)) yaml_conf["recipients"] = recipients print( "\nNow configure the interval at which rep will be farmed, called delay." ) delay = int(input("Enter the interval in seconds: ")) yaml_conf["delay"] = int(delay) print("\nFinally, configure the channel to farm rep in.") channel = input("Enter the id of the channel: ") yaml_conf["channel"] = int(channel) return yaml_conf
def populate_config(self, yaml_conf): """Populates a new config with user input via commandline :param yaml_conf: An example config to replace values of :return: A populated config """ yaml_conf["firsttime"] = False print( "This appears to be your first time running DAB. Please populate the config manually or through these steps." ) token = input("Enter the token: ") print( "\nConfigure an owner for DAB. This will be a user's id (probably you) which will control the bot." ) print("You can configure multiple owners manually (See Documentation)") owners = [] owners.append(int(input("Enter the id: "))) save_shared(token, owners) enabled = input( "Now, enter 'True' or 'False' to enable/disable message farming: ") enabled = utils.string_to_bool(enabled) yaml_conf["enabled"] = enabled if not enabled: print("\nMessage Farming disabled.") return yaml_conf channels = [] channels.append(int(input("\nEnter the channel id to farm in: "))) yaml_conf["channels"] = channels print( "\nThe next configuration option is called silence. Enter a positive number to remove farming messages after that amount in seconds." ) print( "You can manually configure DAB later to delete messages after a random amount of time (See Documentation)" ) silent = input("Enter a number or 'False' to disable silence: ") silent = utils.string_to_bool(silent) # If user didn"t disable silence, convert it to integer if not isinstance(silent, bool): silent = int(silent) yaml_conf["silent"] = silent print( "\nThe next configuration option is delay. This is the interval in which farming messages are sent." ) print( "Delay can be configured manually to send messages at random intervals (See Documentation)" ) delay = int( input( "Please enter a number (in seconds) in which messages will be sent: " )) yaml_conf["delay"] = delay print( "\nThe next configuration option is messages. Enter a message below that DAB will use to farm." ) print( "This is an important option because some bots require a certain amount of characters to award points and such." ) print( "We will start with one message, you can later configure multiple (See Documentation)" ) messages = [] messages.append(input("Enter a message: ")) yaml_conf["messages"] = messages print( "\nFinally: Random Channels. 'True' will cause it to send messages to configured channels in a random manner." ) print( "However, for this option to work, you must have manually configured multiple channels. 'False' will disable it." ) randomchannels = input("Enter 'True' or 'False': ") yaml_conf["randomchannels"] = utils.string_to_bool(randomchannels) return yaml_conf
def populate_config(self, yaml_conf): """Populates a new config with user input via commandline :param yaml_conf: An example config to replace values of :return: A populated config """ yaml_conf["firsttime"] = False print( "\nIt looks like you haven't configured options for kohaipp yet. You can do that now or manually later." ) enabled = input( "Enter 'True' or 'False' to enable or disable kohaipp farming for the time being: " ) enabled = utils.string_to_bool(enabled) yaml_conf["enabled"] = enabled if not enabled: print("\nKohaipp farming has been disabled.") return yaml_conf print( "\nThe first kohaipp feature you can automate is begging. You can beg for gold at any pp size." ) begging = input( "Enter 'True' or 'False' to enable/disable automating begging: ") begging = utils.string_to_bool(begging) yaml_conf["begging"] = begging print( "\nThe second kohaipp feature you can automate is raid. You can raid at any pp size." ) raiding = input( "Enter 'True' or 'False' to enable/disable automating raiding: ") raiding = utils.string_to_bool(raiding) yaml_conf["raiding"] = raiding print( "\nThe third kohaipp feature you can automate is mining. You can begin mining at 20k+ pp size." ) mining = input( "Enter 'True' or 'False' to enable/disable automating mining: ") mining = utils.string_to_bool(mining) yaml_conf["mining"] = mining print( "\nThe fourth kohaipp feature you can automate is pet bonding. You can bond whenever you get a pet." ) bonding = input( "Enter 'True' or 'False' to enable/disable automating bonding: ") bonding = utils.string_to_bool(bonding) yaml_conf["bonding"] = bonding print("\nNow we need to configure a channel to automate kohaipp in.") print( "You can manually assign a specific channel for each operation, right now we will use one channel for all operations." ) channel = input("Enter the channel id to automate kohaipp in: ") yaml_conf["begchannel"] = int(channel) yaml_conf["raidchannel"] = int(channel) yaml_conf["minechannel"] = int(channel) yaml_conf["bondchannel"] = int(channel) print( "\nIntervals for each automation are automatically set to be compatible with Kohaipp cooldowns." ) print("However, you can tweak these manually.") return yaml_conf