{"id":18320562,"url":"https://github.com/chdb-io/chdb-discord-bot","last_synced_at":"2025-08-20T08:17:20.847Z","repository":{"id":177926420,"uuid":"661102372","full_name":"chdb-io/chdb-discord-bot","owner":"chdb-io","description":"Discord bot running chdb/ClickHouse queries, powered by Deta.space","archived":false,"fork":false,"pushed_at":"2023-08-27T14:16:59.000Z","size":68,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T22:32:38.673Z","etag":null,"topics":["bot","chdb","clickhouse","deta","deta-space","discord"],"latest_commit_sha":null,"homepage":"https://chdb.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chdb-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["chdb-io"]}},"created_at":"2023-07-01T19:48:46.000Z","updated_at":"2023-12-29T12:56:00.000Z","dependencies_parsed_at":"2024-01-23T17:17:26.128Z","dependency_job_id":"61e11f0d-bc77-4335-930d-3da1153da657","html_url":"https://github.com/chdb-io/chdb-discord-bot","commit_stats":null,"previous_names":["lmangani/chdb-discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chdb-io/chdb-discord-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chdb-io%2Fchdb-discord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chdb-io%2Fchdb-discord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chdb-io%2Fchdb-discord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chdb-io%2Fchdb-discord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chdb-io","download_url":"https://codeload.github.com/chdb-io/chdb-discord-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chdb-io%2Fchdb-discord-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271285534,"owners_count":24732930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","chdb","clickhouse","deta","deta-space","discord"],"created_at":"2024-11-05T18:16:42.626Z","updated_at":"2025-08-20T08:17:20.829Z","avatar_url":"https://github.com/chdb-io.png","language":"Python","funding_links":["https://github.com/sponsors/chdb-io"],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://chdb.fly.dev\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://github.com/lmangani/chdb-discord-bot/assets/1423657/c759f2bc-ecd7-464c-aaab-b9bfbc9b3569\" height=130 \u003e\n\u003cimg src=\"https://avatars.githubusercontent.com/u/132536224\" width=140 /\u003e\n\u003c/a\u003e\n\n# chdb-discord-bot\nServerless bot running SQL queries using [chDB](https://chdb.io) [public servers](https://chdb.fly.dev) or any ClickHouse HTTP/S APIs\n\n## Features\n- `/ping` - a simple command that tells you the bot's latency.\n- `/query \u003cquery\u003e [format]` - a command that queries [chDB API](https://chdb.io) (ClickHouse).\n- A status message `Listening to /query! | chDB` via [scheduled actions](https://deta.space/docs/en/basics/micros#scheduled-actions).\n- And you can easily create and add more commands yourself!\n\n\n## Requirements\n- **Discord Application:** Create an app for **FREE** at [Discord Developer Portal](https://discord.com/developers/applications).\n- **Deta Space account:** Create an account for **FREE** at [Deta Space](https://deta.space/), username + password.\n- **chDB API URL:** Use the public service, or point at your HTTP/S chDB/ClickHouse compatible API..\n\n## Running Online\n1. Create a new deta.space application:\n   1. Install the [Space CLI](https://deta.space/docs/en/basics/cli).\n   2. Clone this repository.\n   3. Make sure you're in the project folder: `$cd \u003cfolder\u003e`\n   4. Create a space app: `$space new`\n   5. Push the space app: `$space push`\n2. Enter the environment variables (Space App Settings ➔ Configuration).\u003cbr\u003e\n    - `DISCORD_APPLICATION_ID` - Your discord app's ID.\n    - `DISCORD_PUBLIC_KEY` - Your discord app's public key.\n    - `DISCORD_BOT_TOKEN` - Your bot's token.\n    - `CHDB_API` - Your ClickHouse HTTP/S API _(optional)_\n    - _Other environment variables are optional._\n4. Set `Interactions Endpoint URL` to `\u003cmicro_url\u003e/bot/interactions`.\n    - This is located in: `https://discord.com/developers/applications/{application_id}/information`\n    - A Micro URL looks like this: `https://chdbdiscordbot-xxxxxxx.deta.app`\n5. Visit `\u003cmicro_url\u003e/bot/api/dash/\u003cdiscord_bot_token\u003e` to register the slash commands for the first time.\n   - If this fails, use the `register.sh` script with your `DISCORD_APPLICATION_ID` and `DISCORD_BOT_TOKEN`\n6. Run `/ping` to make sure it's working! Enjoy!\n\n## Test Commands\n\n![chdb-discord-bot](https://github.com/lmangani/chdb-discord-bot/assets/1423657/c0db85ef-0cf6-46ef-91da-d2d42fffabee)\n\n## Powered by Deta.space\nThis Discord bot is **SERVERLESS** which means it can run for **FREE** and be **ALWAYS online** on [Deta Space](https://deta.space)!  \n\nCode forked and adapted from [chatgpt-discord-bot](https://github.com/imptype/serverless-chatgpt-discord-bot)\n\n## Links and Resources\n- **Deta Space Documentation:** https://deta.space/docs\n- **Discohook Discord:** https://discord.gg/xEEpJvE9py\n- **Discord API Documentation:** https://discord.com/developers/docs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchdb-io%2Fchdb-discord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchdb-io%2Fchdb-discord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchdb-io%2Fchdb-discord-bot/lists"}