Is the file with your code called discord.py perhaps? If so, you need to rename it - otherwise when you say import discord, it will import your own script instead of the discord module.
Also just FYI, it's not possible to have a Python script run while Pythonista is in the background - iOS does not allow apps to run in the background for a long time. I don't know anything about writing Discord bots, but I assume that you have to keep your script running in order for the bot to work. So if you want your bot to always run, without having to start it manually first, you're probably better off running it on a regular computer instead of a mobile device.