Implement thread events
Closed this issue · 0 comments
LeadcodeDev commented
Implementation
- Thread Create
- Thread Update
- Thread Delete
- Thread List Sync
- Thread Member Update (I don't see the uses ?)
- Thread Members Update
See more here
Description
Threads are a text channel's fragment who used to replied to another user in guild context.
Proposal
The thread is a guild text channel who users can create it like:
ThreadChannel thread = <ServerTextChannel>.threads.create(name: "Look at my thread !!", type: ThreadType.public, invitable: true, rateLimitPerUser: 500);
thread.send(content: "Hello from Mineral !");
thread.delete(reason: "I didn't like it :p");
// Other methods like text channel's methods
[...]
Use the events:
client.events.server.threadCreate((thread, server) => print("New thread created !"));
client.events.server.threadUpdate((thread, server) => print("Thread updated !"));
client.events.server.threadDelete((thread, server) => print("Thread deleted !"));