Added: Slow Mode & Updated discord.js

This commit is contained in:
DJj123dj
2025-08-28 08:59:16 +02:00
parent 1ef74f0b6b
commit 793c6f0603
3 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
"@types/node": "^22.5.0",
"@types/terminal-kit": "^2.5.7",
"ansis": "^2.3.0",
"discord.js": "^14.19.3",
"discord.js": "^14.22.1",
"formatted-json-stringify": "^1.2.1",
"terminal-kit": "^3.1.2",
"typescript": "^5.5.4"
+8 -5
View File
@@ -73,7 +73,7 @@ export const registerActions = async () => {
permissions.push({
type:discord.OverwriteType.Role,
id:admin,
allow:["ViewChannel","SendMessages","AddReactions","AttachFiles","SendPolls","ReadMessageHistory","ManageMessages"],
allow:["ViewChannel","SendMessages","AddReactions","AttachFiles","SendPolls","ReadMessageHistory","ManageMessages","PinMessages","EmbedLinks"],
deny:[]
})
})
@@ -82,7 +82,7 @@ export const registerActions = async () => {
permissions.push({
type:discord.OverwriteType.Role,
id:admin,
allow:["ViewChannel","SendMessages","AddReactions","AttachFiles","SendPolls","ReadMessageHistory","ManageMessages"],
allow:["ViewChannel","SendMessages","AddReactions","AttachFiles","SendPolls","ReadMessageHistory","ManageMessages","PinMessages","EmbedLinks"],
deny:[]
})
})
@@ -93,16 +93,18 @@ export const registerActions = async () => {
type:discord.OverwriteType.Role,
id:admin,
allow:["ViewChannel","ReadMessageHistory"],
deny:["SendMessages","AddReactions","AttachFiles","SendPolls"]
deny:["SendMessages","AddReactions","AttachFiles","SendPolls","PinMessages"]
})
})
permissions.push({
type:discord.OverwriteType.Member,
id:user.id,
allow:["ViewChannel","SendMessages","AddReactions","AttachFiles","SendPolls","ReadMessageHistory"],
allow:["ViewChannel","SendMessages","AddReactions","AttachFiles","SendPolls","ReadMessageHistory","EmbedLinks","PinMessages"],
deny:[]
})
const slowMode = option.get("opendiscord:slowmode-enabled").value ? option.get("opendiscord:slowmode-seconds").value : undefined
//create channel
const channel = await guild.channels.create({
type:discord.ChannelType.GuildText,
@@ -111,7 +113,8 @@ export const registerActions = async () => {
topic:channelTopic,
parent:category,
reason:"Ticket Created By "+user.displayName,
permissionOverwrites:permissions
permissionOverwrites:permissions,
rateLimitPerUser:slowMode
})
await opendiscord.events.get("afterTicketChannelCreated").emit([option,channel,user])
+1 -1
View File
@@ -148,7 +148,7 @@ export class ODClientManager {
if (!this.token) reject("Client doesn't have a token!")
try {
this.client.once("ready",async () => {
this.client.once("clientReady",async () => {
this.ready = true
//set slashCommandManager & contextMenuManager to client applicationCommandManager