CozeDiscord, a project that allows you to use chatgpt4
for free. Coze is a project that allows us to use chatgpt4
models for free. After creating a new bot in Coze, you can publish it to Discord. At this point, we can then use the discord.py repository to implement a DiscordBot
that can create channels, send messages, and receive replies. We can then use this bot to send messages to the CozeBot
and get replies from it, in order to use chatgpt4
for free!
- Create a new channel in the server
- Send a message to
CozeBot
on the specified channel. - Support AI drawing
- Interfacing with CozeDiscordFrontend
- Other (under development)
-
Create a new channel
/api/channel/create
Request Methods:
POST
Parameters:
- Content-Type: application/json
- Body:
{ "channel_name": "test_channel" }
Example:
~/CozeDiscord$ curl -X POST -H "Content-Type: application/json" -H "token: nanomoa" -d '{"channel_name": "test_channel"}' http://127.0.0.1:5000/api/channel/create {"code":1,"data":{"channel_id":1200000000000000053,"channel_name":"test_channel"},"message":"Create channel success."}
-
Delete channel
/api/channel/delete
Request Methods:
POST
Parameters:
- Content-Type: application/json
- Body:
{ "channel_id": 1200000000000023 }
Example:
~/CozeDiscord$ curl -X POST -H "Content-Type: application/json" -H "token: nanomoa" -d '{"channel_id": 1200000000000023}' http://127.0.0.1:5000/api/channel/delete {"code":1,"message":"Delete channel success."}
-
Send a message and get a reply
/api/chat/send
Request Methods:
POST
Parameters:
-
Content-Type: application/json
-
Body:
{ "channel_id": 1200000000000000086 "message": "test" }
Example:
~/CozeDiscord$ curl -X POST -H "Content-Type: application/json" -H "token: nanomoa" -d '{"channel_id":1200000000000000086,"message":"test"}' http://127.0.0.1:5000/api/chat/send {"code":1,"data":{"message":"Hello! How can I assist you today? If you need to test something or have any questions, feel free to ask."},"message":"Send message success."}
-
- Go to the Discord Developer Platform
- Create a new app and copy the token.
- Go to Coze
- Create a new bot and install the
DALLE 3
plugin on it. - Publish the bot to Discord and add it to your server
- Create a new Discord app and give it administrator rights.
- Add it to your server
- then configure the project's
config.yaml
file - Install all the libraries and run the project
- After it finishes running you will see the command line output
Logged in as {your bot's name}
.
Coze: Next-generation AI chatbot building platform.
Discord: A community for gaming, learning, music and more.
discord.py: An API wrapper for Discord written in Python.