Skip to content

Commit

Permalink
Fix documentation to send a chat (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
f4th4n authored Feb 28, 2024
1 parent 71ff695 commit 189bf2c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/nakama-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ socket.onchannelmessage = (message) => {
// 1 = room, 2 = Direct Message, 3 = Group
const type : number = 1;
const roomname = "mychannel";
const persistence : boolean = false;
const hidden : boolean = false;
const type: number = 1;
const persistence: boolean = false;
const hidden: boolean = false;
const channel = await socket.joinChat(type, roomname, persistence, hidden);
const channel = await socket.joinChat(roomname, type, persistence, hidden);
const message = { "hello": "world" };
socket.writeChatMessage(channel.channel.id, message);
const message = { hello: "world" };
socket.writeChatMessage(channel.id, message);
```
## Handling errors
Expand Down

0 comments on commit 189bf2c

Please sign in to comment.