-
Notifications
You must be signed in to change notification settings - Fork 13
docs: add Discord, Amplitude, Mixpanel, and Stripe connectors #910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
03b9f8f
docs: add Discord Bot connector, sync Discord tool drift, document bo…
Pranesh-Raghu 5e45797
docs: add Amplitude Analytics and Amplitude Experiment Management con…
Pranesh-Raghu d15794d
docs: add Mixpanel Analytics/Ingestion/Compliance and Stripe connectors
Pranesh-Raghu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
src/components/templates/agent-connectors/_setup-discordbot.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| import { Steps, Aside, Tabs, TabItem } from '@astrojs/starlight/components' | ||
|
|
||
| Register your Discord bot token with Scalekit so it can authenticate and proxy requests on behalf of your users. Discord Bot uses Bearer Token authentication — there is no redirect URI or OAuth flow. | ||
|
|
||
| <Steps> | ||
| 1. ### Create a Discord application and bot user | ||
|
|
||
| - Go to the [Discord Developer Portal](https://discord.com/developers/applications) and sign in with your Discord account. | ||
| - Click **New Application**, enter a name (for example, `Agent Auth`), accept the terms, and click **Create**. | ||
| - Open your application and go to **Bot** in the left sidebar. | ||
|
|
||
| 2. ### Get your bot token | ||
|
|
||
| - On the **Bot** page, under **Token**, click **Reset Token** to generate a new bot token and copy it immediately — Discord shows the full token only once. | ||
|
|
||
|  | ||
|
|
||
| <Aside type="caution" title="Keep your bot token secret"> | ||
| Anyone with your bot token can control your bot completely. If you suspect it has leaked, click **Reset Token** immediately to invalidate the old one. | ||
| </Aside> | ||
|
|
||
| 3. ### Invite the bot to a server | ||
|
|
||
| - Go to **OAuth2** > **URL Generator** in the left sidebar. | ||
| - Under **Scopes**, select **bot**. | ||
| - Under **Bot Permissions**, select the permissions your agent needs. | ||
|
|
||
|  | ||
|
|
||
| - Copy the generated URL at the bottom of the page, open it in a browser, and select a server to add the bot to. | ||
|
|
||
| 4. ### Create a connection in Scalekit | ||
|
|
||
| - In the [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** → **Connections** → **Create Connection**. | ||
| - Search for **Discord Bot** and click **Create**. | ||
| - Note the **Connection name** — use this as `connection_name` in your code (e.g., `discordbot`). | ||
|
|
||
| 5. ### Add a connected account | ||
|
|
||
| Connected accounts link a specific user identifier in your system to a Discord bot token. Add them via the dashboard for testing, or via the Scalekit API in production. | ||
|
|
||
| **Via dashboard (for testing)** | ||
|
|
||
| - Open the connection and click the **Connected Accounts** tab → **Add account**. | ||
| - Fill in **Your User's ID** and **Bot Token**, then click **Save**. | ||
|
|
||
| **Via API (for production)** | ||
|
|
||
| <Tabs syncKey="tech-stack"> | ||
| <TabItem label="Node.js"> | ||
| ```ts | ||
| await scalekit.connect.upsertConnectedAccount({ | ||
| connectionName: 'discordbot', | ||
| identifier: 'user@example.com', | ||
| credentials: { apiKey: 'your-discord-bot-token' }, | ||
| }) | ||
| ``` | ||
| </TabItem> | ||
| <TabItem label="Python"> | ||
| ```python | ||
| scalekit_client.connect.upsert_connected_account( | ||
| connection_name="discordbot", | ||
| identifier="user@example.com", | ||
| credentials={"api_key": "your-discord-bot-token"}, | ||
| ) | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| </Steps> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| --- | ||
| title: 'Discord Bot connector' | ||
| tableOfContents: true | ||
| description: 'Connect to Discord as a bot. Manage guilds, channels, members, messages, roles, webhooks, and more using a Discord Bot Token.' | ||
| sidebar: | ||
| label: 'Discord Bot' | ||
| overviewTitle: 'Quickstart' | ||
| connectorIcon: https://cdn.scalekit.com/sk-connect/assets/provider-icons/discord.svg | ||
| connectorAuthType: API Key | ||
| connectorCategories: [Communication, Collaboration] | ||
| head: | ||
| - tag: style | ||
| content: | | ||
| .sl-markdown-content h2 { | ||
| font-size: var(--sl-text-xl); | ||
| } | ||
| .sl-markdown-content h3 { | ||
| font-size: var(--sl-text-lg); | ||
| } | ||
| --- | ||
|
|
||
| import ToolList from '@/components/ToolList.astro' | ||
| import { tools } from '@/data/agent-connectors/discordbot' | ||
| import { Steps, Tabs, TabItem } from '@astrojs/starlight/components' | ||
| import { AgentKitCredentials } from '@components/templates' | ||
| import { SetupDiscordbotSection } from '@components/templates' | ||
| import { QuickstartGenericApikeySection } from '@components/templates' | ||
|
|
||
| <Steps> | ||
|
|
||
| 1. ### Install the SDK | ||
|
|
||
| <Tabs syncKey="tech-stack"> | ||
| <TabItem label="Node.js"> | ||
| ```bash frame="terminal" | ||
| npm install @scalekit-sdk/node | ||
| ``` | ||
| </TabItem> | ||
| <TabItem label="Python"> | ||
| ```bash frame="terminal" | ||
| pip install scalekit | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| Full SDK reference: [Node.js](/agentkit/sdks/node/) | [Python](/agentkit/sdks/python/) | ||
|
|
||
| 2. ### Set your credentials | ||
|
|
||
| <AgentKitCredentials /> | ||
|
|
||
| 3. ### Set up the connector | ||
|
|
||
| Register your Discord Bot credentials with Scalekit so it can authenticate requests on your behalf. You do this once per environment. | ||
|
|
||
| <details> | ||
| <summary>Dashboard setup steps</summary> | ||
|
|
||
| <SetupDiscordbotSection /> | ||
|
|
||
| </details> | ||
|
|
||
| 4. ### Make your first call | ||
|
|
||
| <QuickstartGenericApikeySection connector="discordbot" toolName="discordbot_get_current_application" providerName="Discord Bot" /> | ||
|
|
||
| </Steps> | ||
|
|
||
| ## What you can do | ||
|
|
||
| Connect this agent connector to let your agent: | ||
|
|
||
| - **Member add guild, add lobby, add thread** — Add a user to a guild using their OAuth2 access token with the guilds.join scope | ||
| - **Role add guild member, modify guild, remove guild member** — Add a role to a guild member | ||
| - **Prune begin guild** — Begin a prune operation to kick inactive members | ||
| - **Delete bulk, all reactions, all reactions for emoji** — Delete multiple messages in a Discord channel in a single request (2-100 messages) | ||
| - **Ban bulk guild, remove guild** — Ban up to 200 users from a guild and optionally delete their recent messages | ||
| - **Commands bulk overwrite global application, bulk overwrite guild application** — Bulk overwrite all global application commands | ||
|
|
||
| ## Tool list | ||
|
|
||
| Use the exact tool names from the **Tool list** below when you call `execute_tool`. If you're not sure which name to use, list the tools available for the current user first. | ||
|
|
||
| <ToolList tools={tools} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.