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