I want to use a function as a String, i have this function:
def getCoins(user): ##Get the Coins from a user.##
try:
with open(pathToUser + user + ".txt") as f:
for line in f:
print(user + " has " + line +" coins!")
except:
print("Error!")
Now it just print the coins, but i want to use it in other codes like this:
client.send_msg(m.text.split(' ')[2] + "has" + coinapi.getCoins('User') + "coins")
How do it do that? So that i can use it like a string, the message in Twitchchat should be:
"USERXYZ has 100 coins"