Bot Guide

Learn how to create your own discord and telegram bots on Generaitiv

Background

Months ago, we released custom model training, allowing token holders to create new, unique AI models that represent specific objects or art styles. Through custom models, the community has produced amazing works of art, and showcased their creativity in new and unanticipated ways.

One of the most popular uses that emerged for custom models turned out to be in the form of bot integrations with discord and telegram - allowing anyone on those platforms to generait art specific to a single art style, character or object. We launched a pilot program in December, setting up bots with curated custom models for several prevalent communities in the space. The results were a success. We observed heavy usage on every bot that was integrated and were shocked to find content generated by our bots being shared on X and other social media platforms as promotional material.

After the initial pilot program, it became clear that this feature should be shared.

Overview

The purpose of this document is to guide users of Generaitiv's bot functionality through the process of setting up their bots via Discord and Telegram, and adding those configured bots to servers and channels. We'll go over the steps required on both Discord and Telegram, as well as all configuration options Generaitiv supports.

Please reach out to us via our social media accounts for further assistance if need be, we're more than happy to help get you setup.

Instructions

Before proceeding, ensure you have either a Discord or Telegram account, depending on the type of bot you wish to create

Creating a Discord Bot

First, navigate to the Discord developer portal and sign into your discord account.

Once you're signed in, you'll see a button in the upper right corner labelled New Application.

View Screenshot

Click the New Application button, name your bot and accept Discord's terms of service.

You can change the name of your bot at any time.

View Screenshot

After creating the application, you'll be redirected to a page displaying information about your bot. Feel free to customize all fields including an image, description or changing the name.

We'll focus on four specific fields here that you'll need to read from and write to in order to make a successful connection to Generaitiv.

Create a new tab and open Generaitiv. Sign in using your wallet, and navigate to your profile where you will find a tab called Bots. Click on this tab, and then the Create Bot button located in the upper left.

View Screenshot

In the next step, you'll need to copy over your Application ID and Public Key from Discord into the corresponding fields shown on Generaitiv.

View Screenshots

After setting up the public key and application ID, the next step is to copy our bot's token over from Discord into Generaitiv. To do this, click on the Bot tab in the sidebar within the Discord Developer Portal, then click on the Reset Token button. You may be prompted to re-enter your discord password at this step.

View Screenshots

After your token is setup you'll be prompted to configure your commands. Please refer to the section below on command configuration for more information about commands. After you've completed command setup, you'll move onto the final step in creating your bot - configuring the interactions endpoint URL. At this step, Generaitiv will provide a URL for you to copy, and instruct you to paste this URL into the Interactions Endpoint URL field within the General Information tab in the discord developer portal.

View Screenshots

Creating a Telegram Bot

To begin setting up a telegram bot, ensure you have a telegram account made and have the app open. You can use both mobile and desktop Telegram apps to configure bots. Bot configuration and management is provided via a special chat in Telegram, with an account called "BotFather".

First, open a browser and navigate to Generaitiv. Connect your wallet and sign in, then navigate to the Bots tab within your profile on Generaitiv. In the upper left corner, press the Create Bot button. Ensure you select Telegram in the dropdown labelled Messenger. Add a name and description for your bot, and proceed to the next step.

View Screenshot

Next, message BotFather on Telegram. You'll see a button at the bottom of the screen labelled Start that you can use to start the conversation.

View Screenshot

Message /newbot and answer the questions BotFather asks in Telegram to create your new bot. Once you've named your bot, BotFather will reply with a token for API access. Copy this token for use in Generaitiv.

You can edit your bot's name, description and image at any time.

View Screenshot

Next, copy the API token from BotFather's earlier reply and paste it into the corresponding field in Generaitiv.

View Screenshot

Proceed to command configuration, based on the instructions below.

Setting up commands

Initially when setting up commands, you are presented with a text field for command name, and a selection box to choose a model. When users interact with your bot in telegram or discord, they'll use the command name you specify here when messaging. For example, if I enter gen into the command name field, and select one of my trained models, users will be able to type /gen to access that trained model. You can setup any number of commands, and link them to models of your choice.

View Screenshot

To configure advanced command options, click on the pencil icon next to the command you just created. A new button will appear showing a settings cog icon, click that to expand advanced command options.

There are several fields available for configuration, detailed below. When you're finished editing your command, click the save icon and then proceed to add more commands or continue to the final step of the bot creation flow.

View Screenshot

Adding your Discord bot to a server

Once you've created your bot, the next step is copying it's installation link and sharing it. To do this, access the Installation tab in the Discord developer portal and select the option to have discord create an installation link. Save your changes and click copy, then share the link with server admins so your bot can get integrated into their server!

View Screenshot

Adding your Telegram bot to a channel

When you initially created your bot with BotFather, you received a t.me URL along with your API token. You can share this URL with channel owners to allow them to install the bot into their channel.

Last updated