Skip to content

Commit

Permalink
Add early return for private interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zingzy committed Dec 22, 2023
1 parent df019c2 commit 12114b8
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
115 changes: 115 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@

<table>
<tr>
<td width="15%"><image src='https://i.spoo.me/299243'/></td>
<td width="75%"><h1>Pollinations.ai Bot</h1>
<i>A discord bot which generates AI images for free ✨</i><br><br>
</td>
</tr>
</table>

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)
1 change: 1 addition & 0 deletions cogs/imagine_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 12114b8

Please sign in to comment.