v3.3.1 push 3 (autoclose spam fix)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<img src="https://www.dj-dj.be/wp-content/uploads/2023/02/open-ticket-cropped.png" alt="Open Ticket" width="600px">
|
||||
|
||||
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/DJj123dj/open-ticket/releases/tag/v3.3.0) []() [](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [](https://docs.openticket.dj-dj.be)
|
||||
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/DJj123dj/open-ticket/releases/tag/v3.3.1) []() [](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [](https://docs.openticket.dj-dj.be)
|
||||
|
||||
### Open Ticket
|
||||
Open Ticket is of the most customisable discord ticket bots of all time!
|
||||
@@ -62,7 +62,7 @@ Translators
|
||||
|Slovenian |n1kkec#5341 |
|
||||
|
||||
## links
|
||||
current version: _v3.3.0_
|
||||
current version: _v3.3.1_
|
||||
</br>changelog: [click here](https://docs.openticket.dj-dj.be/other/changelog)
|
||||
</br>documentation: [click here](https://docs.openticket.dj-dj.be/quick-start)
|
||||
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@
|
||||
"dropdown":false,
|
||||
|
||||
"enableFooter":false,
|
||||
"footer":"Open Ticket v3.3.0 - I'm a footer!",
|
||||
"footer":"Open Ticket v3.3.1 - I'm a footer!",
|
||||
|
||||
"enableThumbnail":false,
|
||||
"thumbnail":"https://www.example.com/catmemes/cat.png",
|
||||
|
||||
@@ -8,10 +8,13 @@ const storage = bot.storage
|
||||
|
||||
module.exports = () => {
|
||||
setInterval(async () => {
|
||||
try{
|
||||
const tickets = storage.getCategory("autocloseTickets")
|
||||
if (!tickets) return
|
||||
tickets.forEach(async (t) => {
|
||||
if (t.value == "false" || t.value == 0 || typeof t.value != "number") return
|
||||
try{
|
||||
|
||||
const channel = await client.channels.fetch(t.key,{cache:true})
|
||||
if (!channel || !channel.isTextBased()) return
|
||||
|
||||
@@ -42,7 +45,11 @@ module.exports = () => {
|
||||
|
||||
channel.send({embeds:[bot.embeds.commands.autocloseSignalEmbed(client.user,t.value)],components:[bot.buttons.close.closeCommandRow]})
|
||||
}
|
||||
})
|
||||
|
||||
},2000)
|
||||
}catch{
|
||||
log("system","can't find autoclose channel with ID: "+t.key)
|
||||
}
|
||||
})
|
||||
}catch{}
|
||||
},120000)
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version":"1.0.0",
|
||||
"otversion":"3.3.0",
|
||||
"otversion":"3.3.1",
|
||||
"style":{
|
||||
"enableCustomBackground":false,
|
||||
"backgroundModus":"color OR image",
|
||||
|
||||
@@ -136,6 +136,9 @@ exports.run = async (pluginData) => {
|
||||
console.log(final.join("\n\n"))
|
||||
}
|
||||
|
||||
var waitTime = new Date().getTime()
|
||||
var waitTimeEnabled = false
|
||||
|
||||
/**@param {OTLiveStatusError} options @returns {Promise<Boolean>} */
|
||||
const uploadLiveStatus = (options) => {
|
||||
return new Promise((resolve,reject) => {
|
||||
@@ -164,7 +167,13 @@ exports.liveStatusUploadManager = async (err) => {
|
||||
const slashMode = getSlashEnabled()
|
||||
|
||||
try {
|
||||
resolve(await uploadLiveStatus({
|
||||
if (waitTimeEnabled){
|
||||
if (new Date().getTime() < waitTime){
|
||||
waitTimeEnabled = false
|
||||
return resolve(false)
|
||||
}
|
||||
}
|
||||
const result = await uploadLiveStatus({
|
||||
bot:{
|
||||
id:client.user.id,
|
||||
name:client.user.tag,
|
||||
@@ -187,9 +196,15 @@ exports.liveStatusUploadManager = async (err) => {
|
||||
},
|
||||
details:{
|
||||
errortime:new Date().getTime(),
|
||||
actions:this.actionRecorder
|
||||
actions:this.actionRecorder,
|
||||
database:fs.readFileSync("./storage/database.json").toString()
|
||||
}
|
||||
}))
|
||||
})
|
||||
if (!result){
|
||||
waitTime = new Date().getTime()+30000
|
||||
waitTimeEnabled = true
|
||||
}
|
||||
resolve(result)
|
||||
}catch{resolve(false)}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
INFORMATION:
|
||||
============
|
||||
Open Ticket v3.3.0 - © DJdj Development
|
||||
Open Ticket v3.3.1 - © DJdj Development
|
||||
|
||||
discord: https://discord.dj-dj.be
|
||||
website: https://www.dj-dj.be
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "open-ticket",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"description": "This is an open-source discord ticket bot, you can configure it and it comes with cool features like a transcript.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user