Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dave

Dave is a discord bot.
Dave is a chat bot. It runs on Discord and Uproar (uproar.chat) at the same time; the Uproar side is optional and stays off until you configure it (see [Uproar](#uproar-uproarchat) below).

## Prerequisites

Expand Down Expand Up @@ -41,6 +41,31 @@ You can disable functions in `lib/CommandDefinitions.ts` if you can't be bothere
* Youtube API: https://developers.google.com/youtube/v3/docs
* Weather API: https://openweathermap.org/price

## Uproar (uproar.chat)

Dave can run on Uproar alongside Discord. It stays Discord-only until you set both
`uproarBotId` and `uproarBotToken` in `lib/Config.ts`; leave them blank to disable it.

Dave connects to Uproar by **dialing out** over a WebSocket, the same way it connects to
Discord's gateway, so there is nothing to host: no public URL, webhook, or open port.

To wire it up:

* Create a bot on Uproar: either an **account-level agent** (Settings > Bots > *My Agents*),
which you then admit into any server, or a **server-owned** bot (a server's
Settings > Bots). The bot's **token is shown once**, at creation, inside the returned URL
(`https://uproar.chat/api/bots/<id>/<token>`). Copy it immediately; it is stored hashed and
never shown again. If you lose it, regenerate a new one.
* Add the bot to the server(s) and channel(s) you want it in. For an account-level agent,
share its handle (`bot.xxxxxxxx`) and have a server admin admit it (Server Settings > Bots).
Give the bot **View Channel** and **Send Messages** in those channels, plus **Attach Files**
(for the image commands) and **Add Reactions** (for polls and paginated replies).
* Fill in the Uproar fields in `lib/Config.ts`:
* `uproarBotId` — the bot's id (the `<id>` in the URL above)
* `uproarBotToken` — the execute token (the `<token>` shown once)
* `uproarBaseUrl` — defaults to `https://uproar.chat`; only change it if you self-host Uproar
* Build and start as usual (below). Commands work exactly as on Discord, with the same `prefix`.

## Installation

`yarn install`
Expand Down
13 changes: 13 additions & 0 deletions lib/Config.ts.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class Config {

public claudeApiKey: string = 'enter claude api key here';

public geminiApiKey: string = 'enter gemini api key here';

public grokApiKey: string = 'enter grok/xai api key here';

public gabApiKey: string = 'enter gab ai api key here';

public gabModel: string = 'arya';
Expand All @@ -50,6 +54,15 @@ class Config {

/* coingecko coin ids to monitor e.g. [{id: 'bitcoin', label: 'bitcoin' }], see coingecko api docs for details */
public coins: string[] = [];

/* Uproar (uproar.chat) integration. Leave the id/token blank to disable it;
* the bot then runs on Discord only. Get the id + token from Uproar when you
* create the bot (Settings > Bots). */
public uproarBaseUrl: string = 'https://uproar.chat';

public uproarBotId: string = '';

public uproarBotToken: string = '';
}

export let config = new Config();
Loading