Using python-pixabay I am trying to search for otter images, then get my discord.py bot to send the image in an embed. After I search for the image and get the image, then I print it out, but it doesn't print anything, so I am pretty sure it's a problem with the image search. I get no error messages, but it just won't work.
Here is my code:
import pixabay
import discord
pixa = os.getenv('PIXABAY_KEY')
image = Image(pixa)
@bot.command(name='otter', help='Generates a random otter!')
async def otter(ctx):
page = random.choice(range(0, 4))
embed = discord.Embed(title='Otter', color=discord.Color.from_rgb)
embed.set_image(url=ims)
embed.set_footer(text='Powered by pixabay.')
await ctx.send(embed=embed)
bot.run(TOKEN)
I didn't show all my code because there is some sensitive stuff in there, but I showed all the things you need to see. Pixabay is definitely installed, as I installed it via the instructions on the PyPi website