Discord bot with Psycopg
Unpacking
Try this rather than hard-coded indexing:
    user, password, host, port, database = db_credentials
    connection = psycopg2.connect(user, ...)

Or, if you're able to rearrange those parameters such that they match those of the connect signature:


dbname – the database name (database is a deprecated alias)
user – user name used to authenticate
password – password used to authenticate
host – database host address (defaults to UNIX socket if not provided)
port – connection port number (defaults to 5432 if not provided)


then you can simply do
connection = psycopg2.connect(*db_credentials)

Logs
Consider replacing
    print(&quot;Trying&quot;)
    print(&quot;connected&quot;)

with calls to the actual logging module, which is more configurable and maintainable.
Quote escapes
'The name that was given to cardbot didn\'t exist in the card table.'

can be
&quot;The name that was given to cardbot didn't exist in the card table.&quot;

In-application queries
Your join_table_query is long. There are several approaches to improve this - either save a view in the database (my favourite), or a stored procedure (common but I think it's overkill in this case).
Injection

the bot is protected from any direct sql injections before I deploy it

This is directly vulnerable:
'''... WHERE card.name = ('%s') ''' % (recordName)

Never (ever) use string formatting to insert parameters to a query. All DB connection libraries have anticipated this concern and most approach it using &quot;prepared statements&quot;.
This article is old but relevant. The actual reference shows that you should be passing vars as a sequence or a mapping, which will prevent injection.