djs-threads 🚀
Blazing fast thread integration for all Discord.js versions 😃
📚Examples:
✨Creating threads
const Discord = require("discord.js")
const client = new Discord.Client()
const threads = require("djs-threads")
const threadEvents = threads.events
threads.login("YOUR TOKEN", 98303)
client.login("YOUR TOKEN")
client.on("ready", () => {
console.log("djs is ready")
})
threadEvents.on("ready", () => {
console.log("djs-threads is ready")
})
client.on("message", (msg) => {
if(!msg.guild) return
if(msg.author.id == "user_id") {
new threads.ThreadManager(msg.channel.id).create({
name: 'why-windows-is-better-than-arch',
autoArchiveDuration: 60
})
}
})
💻All Functions
new threads.ThreadManager("GUILD_TEXT_CHANNEL_ID").create(OPTIONS_OBJECT)
new threads.ThreadManager("GUILD_THREAD_CHANNEL_ID").join()
new threads.ThreadManager("GUILD_THREAD_CHANNEL_ID").leave()
new threads.ThreadManager("GUILD_THREAD_CHANNEL_ID").remove("USER_ID")
new threads.ThreadManager("GUILD_THREAD_CHANNEL_ID").add("USER_ID")
const manager = new threads.ThreadManager("GUILD_THREAD_CHANNEL_ID")
const fetchMember = await manager.fetchMember("USER_ID")
const manager = new threads.ThreadManager("GUILD_THREAD_CHANNEL_ID")
const getMembers = await manager.members()
const manager = new threads.ThreadManager("GUILD_TEXT_CHANNEL_ID")
const getMembers = await manager.getThreads({public: true, archived: true})
💻All Events
ready
threadCreate
threadDelete
threadUpdate
threadMemberUpdate
threadMembersUpdate
NOTE: THIS PACKAGE IS NOT FINISHED YET
Made with ❤ By ! SpongeBed#8181