A bot can’t accept invites as a regular user can. Alternatively, you’ll add your bot using the OAuth2 protocol.