Skip to content

Commit e3e7b30

Browse files
update: README improvements
1 parent 9981dbc commit e3e7b30

File tree

2 files changed

+40
-13
lines changed

2 files changed

+40
-13
lines changed

README.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,22 @@
1414

1515
It handles various interactions, adds a layer of wrapper over raw interactions with rich utility methods, and organizes them into modular routes, making your bot's code cleaner, easier to understand, and easier to maintain. It works seamlessly in both serverless and persistent server environments.
1616

17-
📄 **Documentation:** [https://discordhttps.js.org/](https://discordhttps.js.org/)
17+
📄 **Documentation:** [https://discordhttps.js.org](https://discordhttps.js.org)
1818

1919
Need help? Join us on discord [https://discord.gg/pSgfJ4K5ej](https://discord.gg/pSgfJ4K5ej)
2020

21+
## Initilize discord.https
22+
23+
You can initialize a project via CLI:
24+
25+
```bash
26+
npx create-discord-https@latest
27+
```
28+
29+
Or, manually:
30+
2131
```js
22-
import Client, { InteractionResponseType } from "discord.https";
32+
import Client from "discord.https";
2333
import NodeAdapter from "@discordhttps/nodejs-adapter";
2434

2535
const client = new Client({
@@ -52,39 +62,56 @@ await client.listen("interactions", 3000, () => {
5262
5363
## Examples
5464

55-
> Examples are outdated. You are no longer required to handle the raw response. The core is still there, and you can use these examples as a reference.
56-
57-
Deprecate warning, this example can be serve as a basic idea, but it has been changed quite a lot since, with utility functions.
65+
Note: You can get this reference implementation directly via CLI, see Initializing Your Project → Using CLI.
5866

5967
**You can view example/reference implementations here:**
6068

61-
- Nodejs Runtime: [https://github.com/discordhttps/nodejs-example](https://github.com/discordhttps/nodejs-example)
62-
- V8 isolates runtime(Cloudflare Workers): [https://github.com/discordhttps/cloudflare-example](https://github.com/discordhttps/cloudflare-example)
69+
- Nodejs: [https://github.com/discordhttps/create-discord-https/tree/main/templates/node](https://github.com/discordhttps/create-discord-https/tree/main/templates/node)
70+
- V8 isolates runtime(Cloudflare Workers): [https://github.com/discordhttps/create-discord-https/tree/main/templates/cloudflare](https://github.com/discordhttps/create-discord-https/tree/main/templates/cloudflare)
71+
- Vercel Serverless: [https://github.com/discordhttps/create-discord-https/tree/main/templates/vercel](https://github.com/discordhttps/create-discord-https/tree/main/templates/vercel)
72+
73+
## Initializing Your Project
74+
75+
### Using CLI (Recommended)
6376

64-
## Installation
77+
```bash
78+
npx create-discord-https@latest
79+
```
80+
81+
Follow the prompts to set up your project.
82+
83+
### Manual Installation
84+
85+
Install discord.https along with the adapter for your server environment.
6586

66-
### Node.js
87+
#### Node.js
6788

6889
```
6990
npm install discord.https @discordhttps/nodejs-adapter
7091
```
7192

72-
### Cloudflare
93+
#### Cloudflare
7394

7495
```
7596
npm install discord.https @discordhttps/cloudflare-adapter
7697
```
7798

99+
#### Vercel
100+
101+
```
102+
npm install discord.https @discordhttps/vercel-adapter
103+
```
104+
78105
## Documentation
79106

80-
- **Discord.https Docs:** [https://discordhttps.js.org/](https://discordhttps.js.org/)
107+
- **Discord.https Docs:** [https://discordhttps.js.org](https://discordhttps.js.org)
81108
- **Discord Interaction Docs:** [Responding to an Interaction](https://discord.com/developers/docs/interactions/receiving-and-responding#responding-to-an-interaction)
82109

83110
## Todo for v4
84111

85-
- [ ] Build a simplified `npx create-app` command
86112
- [ ] Implement tests
87113
- [ ] Build channel, guild, etc wrapper
114+
- [x] ~~Build a simplified `npx create-app` command~~
88115
- [x] ~~Build interaction wrapper~~
89116
- [x] ~~HTTP adapters to support most hosting environments~~. Currently implemented: Node.js adapter for [Node.js runtime](https://github.com/discord-http/nodejs-adapter) and [Cloudflare adapter for V8 isolates runtime](https://github.com/discord-http/cloudflare-adapter)
90117
- [x] Examples(currently outdated, requires update)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "discord.https",
3-
"version": "3.0.15",
3+
"version": "3.0.16",
44
"description": "Discord.https is a modular library for building and managing Discord HTTP interactions with the Discord API. It provides tools for routing and managing interaction efficiently.",
55
"main": "./dist/index.js",
66
"type": "module",

0 commit comments

Comments
 (0)