Skip to content
Permalink
f110250b99
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 18 lines (18 sloc) 1.08 KB
import database
def settings(message, guild_id):
prefix = database.read_database("command_prefix", guild_id)
if "help" in message.lower():
setting_list = ["minecraft_server [URL of Server]", "server_port [Server Port]", "command_prefix [Bot Prefix ('?' by default)", "map [URL of online map]", "download [World download link]"]
msg = "Use the setting function to change settings of this bot for your server "
msg = msg + "\nUse the following commands to change the settings"
for i in setting_list:
msg = "{}\n - {}settings {}".format(msg, prefix, i)
return msg
splitMessage = message.split()
try:
command = str(splitMessage[0])
database.modify_database(splitMessage[(splitMessage.index(command)) + 1], splitMessage[(splitMessage.index(command)) + 2], guild_id)
msg = "{} has been set to {}".format((splitMessage[(splitMessage.index(command)) + 1]), (splitMessage[(splitMessage.index(command)) + 2]))
except:
return "Not an available setting, use '{}settings help' for help".format(prefix)
return msg