All things generative! Discord Bot

Overview

Thingy

Discord bot to generate images based on a text prompt - way more than just that! Through a wide variety of tools, you can alter your generated images and share them with friends.

Integrates with DiscoArt, Stable Diffusion and other peculiarities, all rolled up in a single, sexy user interface that allows one to mix and match different configurations without a steeper learning curve!

  • Powerful customization tools
  • Fairness queue: Making sure everyone gets to make art!
  • Social features: Sharing, profiles and stats
  • Advanced Profile customization
  • Chapters: Work on your pieces, and switch back to previous works of art!
    • Every "creation" command (/stable_diffusion, /disco_diffusion) results in a new chapter
    • Users can use variation commands (/upscale, /variate, more to come) to alter said chapters as they wish
    • Don't like a change? Just do /rollback! There's unlimited undo!
    • Users can instantly swap back to previous chapters with /chapters

Demo video + dev journey

In short: this bot allows you to generate images based on a text prompt, but can do way more than just that - offering a wide variety of tools to make alter your generated images.

Credits and special thanks

  • First and foremost Han Xiao for being around in DMs helping me with what I struggled with but also putting me on the right direction in various moments
  • DiscoArt: without this project, I was never able to cook this up in a weekend
  • Jina which has some incredible tooling I got familiar with

Demo

My discord server has the bot running, both alpha and production bots are up!

Run it yourself!

As this bot is open-source, anyone can run it. Depending on the method, you need different specs. The easiest is through Docker and Jina's JCloud

Installing via Docker

Note! As we evolved from a weekend project to a larger-scale bot, things have changed a lot, and I thank you all. Please, if you use this in your own server, do get in touch with me, so we can see what works and what doesn't. Any feedback is really appreciated! Feel free to join Thingy's birthplace or shoot a line in the projects Issues page!

What you need:

  • Linux or Windows with Docker installed (Or download here)
  • Discord account and bot (more on this later)

Steps:

  • Create a directory where we will set up our bot

    • If you ran an older version of the bot, you can drop your db.sqlite here. Keep in mind the configuration has changed slightly. Otherwise, you can ignore this.
  • Download this file and name it config.yml, put it into the bot directory.

  • Once done, follow "Setting up the bot" and then go back here

  • Download the bot interface (communicates with the AI) from here and put it in the bot directory

  • The following steps are for running the AI remotely on JCloud! (Free for now!)

    • We need to start the Docker image:

      • If you're starting fresh, you can use the following command in the bot directory: docker run -v $(pwd):/opt/thingy/data -d --name=thingy peterwilli/thingy:latest

      • If you've ran the bot on JCloud before, chances are it's already up. Run jc list either in an already spawned container, or whatever your current setup is. If there's a link, you can run jina status <id from jc list> to see if it's the thingy flow (typically contains executors like stable_diffusion_txt2img and stable_diffusion_img2img)

        You can now run docker run -v $(pwd):/opt/thingy/data -it --name=thingy --env CURRENT_JCLOUD_URL=grpcs://xxxxx.wolf.jina.ai peterwilli/thingy:2.0-alpha3 where xxxxx is your Jina instance ID.

    • Once it is running, log in to JCloud by running: docker exec -it thingy jc login. You should now get a link that you can copy-paste in your browser to login.

    • You should now see a error about docker not being present, that's ok, it will still work.

    • Now you should be able to run /stable_diffusion and other peculiarities in Discord! The first time it might take a while to run.

Setting up the bot

  • Create a Discord application on their developer portal
  • Make a discord bot by clicking on the Bot menu, and click "Add Bot". Name it as you like
  • Click "Reset Token" to reveal the bot token. Make note of this token, you need it in the next step
  • In the config.yml, change the bot name and token to your bot token
  • Go to Hugginface Tokens (make an account if you don't have one yet) and create a token
    • Replace token_from_hf in config.yml with the token you just created
    • This token allows you access to the Stable Diffusion model!
  • Assuming you run the Jina Flow server as well as the Discord bot on the same machine, you don't need to do anything
    • If your Jina server is remote, you have to change host and port under grpcServer
    • If you run on JCLoud, make sure to set port to 443 and plainText to false!
      • Make sure host does not include grpcs://!
  • Save the config
  • Go to the OAuth2 menu, and click the URL Generator submenu. Check off the Bot checkbox
  • In bot permissions, you only need the following: Bot permissions checkboxes
  • After you have done this, you can copy the link and invite the bot into your server
    • The first time, the bot may be triggering a timeout error, this is because it has to download all the model files. After it's done, it'll run properly
  • You can now resume the previous steps (wherever you were forwarded from)

How to enable the Share feature (optional)

  • Make sure Discord is in developer mode
  • Make a channel, any place you like (bot needs to be able to post to it, so make sure has write permissions there). Name it something like gallery
  • Right-click on the channel and click "Copy ID"
  • Paste the channel ID in shareChannelID in the bot's config.yml. Restart bot if its running!
  • Now you and your members can use /share for showcasing your fine art!

Sister projects

These are co-developed with Thingy!

Changelog

  • 26 sept 2022: Added Keep My JCloud as sister project, integrated in the bot using Docker. It keeps JCloud instances running by re-deploying if it dissapears.
You might also like...
🐦 Loritta's Social media relayer via Discord Webhooks micro-service

🐦 SocialRelayer 🐦 SocialRelayer is a social media relayer to Discord via webhooks, pulling Loritta's guild configurations to automatically register

An open-source reimplementation of the Discord Android app

OpenCord An open source reimplementation of the Discord Android app. Why does this exist? Current discord app sucks as it looks ugly and doesn't suppo

Experimental Discord Mobile Rich Presence (Android)

MRPC Experimental Discord Mobile Rich Presence (Android) How does it work? It's pretty simple. Connect to the Discord Gateway as a normal Discord Clie

A Discord audio player that streams audio from the desktop.

Synced A Discord audio player that streams audio from the desktop. Synced runs as a bot that plays audio to your selected Discord server. You can cont

Mindusty -- Discord

Minducord Mindustry -- Discord Setup Go to Releases and download minducord.jar. After download, paste it to mods folder and run server. If you can s

Photon Framework provides cool way to Discord Slash Commands πŸ‘©β€πŸ’» 🚧

Photon Framework provides cool way to Discord Slash Commands πŸ‘©β€πŸ’» 🚧

🎧 Hacky last.fm Discord rich presence
🎧 Hacky last.fm Discord rich presence

LastFmRichPresence 🎧 Hacky last.fm Discord rich presence How to use?

An open-source reimplementation of the Discord Android app
An open-source reimplementation of the Discord Android app

OpenCord An open-source reimplementation of the Discord Android app. Chat Drawer Why does this exist? Current Discord app sucks as it doesn't support

marudor.de for Discord
marudor.de for Discord

hafalsch marudor.de for Discord Features Train Station Search Journey details TrΓ€welling Check In Sources marudor.de - The Marudor API is used to retr

Releases(v2-alpha-3)
Owner
Peter Willemsen
You may leave empty-handed, but you never leave empty minded.
Peter Willemsen
AsukaBot - A simple Kotlin Discord Bot

The Discord bot of the serber, a private Discord server. Asuka is a Discord But running on the JDA API but made in kotlin.

Yann ItzPeaxel 2 Apr 24, 2022
Urban Dictionary discord bot.

Urban Dictionary Installation & Setup 1. Clone the repository git clone https://github.com/thexxiv/urbandictionary-discord-bot.git 2. Navigate to the

XXIV 0 Jan 17, 2022
DiscordBot - Small Discord bot using JDA

Discord bot written in kotlin and using JDA Use it yourself ./gradlew build crea

chell 2 Feb 2, 2022
TimmyBot is a discord bot based on Discord4J and LavaPlayer

TimmyBot TimmyBot is a discord bot based on Discord4J and LavaPlayer Invite Click here to invite Timmy to your server Commands ?play - Plays a song, e

Ian de Villiers 0 Apr 21, 2022
A simple Discord bot that aims to provide a snapshot of the join logs given a range of time for servers.

?? What is Humpy Dumpy? Humpy Dumpy is a simple Discord bot that aims to provide a snapshot of the join logs given a range of time for servers. It was

Miu 2 Aug 29, 2022
A Discord bot heavily inspired by Ultimate Bravery to spice up your Pokemon Unite experience.

UniteBraveryBot ?? A Discord bot heavily inpired by Ultimate Bravery to spice up your Pokemon Unite experience. Required Permissions ?? View Channels

Alexander Deledda 2 Sep 8, 2022
A lightweight, feature-rich wrapper for the Telegram Bot API, providing a handy Kotlin DSL to quickly build your bot.

Kotlin Telegram Bot Kotlin based wrapper over Telegram API. Current version of the Telegram Api: 6.0 Principles Annotations Magic. The basic interacti

Jey 61 Dec 27, 2022
Connect UPG is an app that enables students to interact and share their thoughts, emotions, feeling as things

Connect UPG is an app that enables students to interact and share their thoughts, emotions, feeling as things

Krish Parekh 7 Jan 18, 2022
A Mindustry v7 mod provides lots of cybernetic things

Cyber IO A Mindustry v7 mod provides lots of cybernetic things!!! How To Play The official website of Cyber IO is liplum.github.io/CyberIO

Li plum 91 Dec 3, 2022