'Getting "<function get_balance at 0x7f85fff6a4c0>" when trying to send balance with praw and bitcoinrpc [closed]

I am trying to make a cryptocurrency tipbot for Reddit in python. I am trying to see if I can communicate with BitcoinAPI and return stuff like balance. My bot should have commented the balance but just commented this:

<function get_balance at 0x7f85fff6a4c0>

What does this even mean?

This is my code:

import praw
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException

# Authenticate with Reddit
reddit = praw.Reddit(
    client_id='',
    client_secret='',
    user_agent='',
    username='',
    password=''
)

reddit.validate_on_submit = True

# Print the username of the bot
print(reddit.user.me())

# TODO: Collect this data
#def getinboxdata(inboxdata):
# for item in reddit.inbox.all(limit=None):
#    print(repr(item))

def get_balance(address):
    rpc_connection = AuthServiceProxy("http://%s:%[email protected]:22555" % ('user', 'pass'))
    get_balance = rpc_connection.getbalance()
    return get_balance # This will print the balance

for item in reddit.inbox.unread(limit=None):
    if item.body == '+bunkertip':
        print('Bunkertip!')
        item.reply(get_balance)
        item.mark_read()
     


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source