From 12114b896e55ebe41de4e023ae9de67586e5dc4a Mon Sep 17 00:00:00 2001 From: Zane <90309290+Zingzy@users.noreply.github.com> Date: Sat, 23 Dec 2023 01:41:55 +0530 Subject: [PATCH] Add early return for private interactions --- README.md | 115 ++++++++++++++++++++++++++++++++++++++++++++ cogs/imagine_cog.py | 1 + 2 files changed, 116 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..dc38581 --- /dev/null +++ b/README.md @@ -0,0 +1,115 @@ + + + + + + +

Pollinations.ai Bot

+ A discord bot which generates AI images for free ✨

+
+ +Welcome to the **Pollinations.ai Bot** repository! This bot is a discord bot which generates AI images using https://pollinations.ai. It is written in Python using the discord.py library. + +--- + +### ✨ Features + +- Generate AI images using the `/imagine` command + - Users can choose from a variety of models like `pixart`, `dreamshaper`, etc. + - Users can also specify the width and height of the image +- Experimental `/multi-imagine` command + - Users can generate images using all available models at once + +--- + +### Getting Started + +1. **Inviting the Bot**: Invite Pollinations.ai bot to your server using the following link: [Invite Pollinations.ai bot](https://discord.com/api/oauth2/authorize?client_id=1123551005993357342&permissions=534791060544&scope=applications.commands%20bot). + +2. **Commands**: Use the various commands mentioned above to start generating AI Images. + +--- + + +### ⚙️ How to setup + +rename the `.env.example` file to `.env` and enter your `Bot token` And `Mongodb uri`. + +#### Create Virtual environment (OPTIONAL) + +Linux + +```bash +python3 -m venv .venv +source .venv/bin/activate + +``` +Windows + +```ps +python -m venv .venv +.venv/Scripts/activate + +``` + +#### install dependencies + +```bash +pip install -r requirements.txt + +``` + +OR + +```bash +pipenv install + +``` + +#### Start the bot + +Linux + +```bash +python3 main.py + +``` +Windows + +```ps +python main.py + +``` + +--- + +### 📝 Feedback / Issues + +To give feedback, ask a question or make a feature request, you can either use the [Github Discussions](https://github.com/Zingzy/pollinations.ai-bot/discussions) or [JOIN OUR SUPPORT SERVER ](https://discord.gg/nBA6kmqaaK)🪬 + +Bugs are logged using the github issue system. To report a bug, simply [open a new issue](https://github.com/Zingzy/pollinations.ai-bot/issues/new). + +--- + +### 🤝 Contributing + +Contributions, issues and feature requests are welcome! Feel free to check [issues page](https://github.com/Zingzy/pollinations.ai-bot/issues). + +--- + +### 💡 what's next + +- Creating an interactive website for the bot +- Adding a leaderboard command + +Any Other suggestions would be appreciated ... + +--- + +### Contributors + +- [@Zinzy](https://github.com/zingzy) - Lead Bot developer + +--- + +[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Zingzy/pollinations.ai-bot/graphs/commit-activity) [![Last-Commit](https://badgen.net/github/last-commit/Zingzy/pollinations.ai-bot)](https://github.com/zingzy/pollinations.ai-bot/commits) [![issues](https://badgen.net/github/issues/Zingzy/pollinations.ai-bot)](https://github.com/Zingzy/pollinations.ai-bot/issues) diff --git a/cogs/imagine_cog.py b/cogs/imagine_cog.py index 7497d86..64e6a80 100644 --- a/cogs/imagine_cog.py +++ b/cogs/imagine_cog.py @@ -179,6 +179,7 @@ async def imagine_command(self, interaction, prompt:str, model: str = "Dreamshap if private: response = await interaction.followup.send(f"## {prompt} - {interaction.user.mention}", file=image_file, ephemeral=True) + return else: response = await interaction.channel.send(f"## {prompt} - {interaction.user.mention}", file=image_file, view=view)