Small README improvements + updated example plugin
Small README improvements + updated example plugin
This commit is contained in:
@@ -1,93 +0,0 @@
|
||||
{
|
||||
"_INFO":"This document contains all Open Ticket contributors.",
|
||||
"SPONSOR_TEMPLATE":{
|
||||
"name":"INSERT_NAME",
|
||||
"pictureUrl":"INSERT_PICTURE_URL",
|
||||
"profileUrl":"INSERT_PROFILE_URL",
|
||||
"sectionId":"INSERT_ID"
|
||||
},
|
||||
"SECTION_TEMPLATE":{
|
||||
"name":"INSERT_NAME",
|
||||
"id":"INSERT_ID",
|
||||
"pfpSize":50,
|
||||
"pfpColumns":5,
|
||||
"withNames":true
|
||||
},
|
||||
"sections":[
|
||||
{
|
||||
"name":"🛠️ Contributors",
|
||||
"id":"contributor",
|
||||
"pfpSize":100,
|
||||
"pfpColumns":8,
|
||||
"withNames":true
|
||||
},
|
||||
{
|
||||
"name":"📞 Discord Support",
|
||||
"id":"support",
|
||||
"pfpSize":100,
|
||||
"pfpColumns":8,
|
||||
"withNames":true
|
||||
},
|
||||
{
|
||||
"name":"🧩 Plugin Developers",
|
||||
"id":"plugin-dev",
|
||||
"pfpSize":100,
|
||||
"pfpColumns":8,
|
||||
"withNames":true
|
||||
},
|
||||
{
|
||||
"name":"💬 Translators",
|
||||
"id":"translator",
|
||||
"pfpSize":100,
|
||||
"pfpColumns":8,
|
||||
"withNames":true
|
||||
}
|
||||
],
|
||||
"contributors":[
|
||||
{"sectionId":"contributor","name":"DJj123dj","pictureUrl":"https://github.com/DJj123dj.png","profileUrl":"https://github.com/DJj123dj"},
|
||||
{"sectionId":"contributor","name":"guillee3","pictureUrl":"https://github.com/guillee3.png","profileUrl":"https://github.com/guillee3"},
|
||||
{"sectionId":"contributor","name":"SKaranjaN","pictureUrl":"https://github.com/SKaranjaN.png","profileUrl":"https://github.com/SKaranjaN"},
|
||||
{"sectionId":"contributor","name":"Ashish5180","pictureUrl":"https://github.com/Ashish5180.png","profileUrl":"https://github.com/Ashish5180"},
|
||||
{"sectionId":"contributor","name":"duboiss","pictureUrl":"https://github.com/duboiss.png","profileUrl":"https://github.com/duboiss"},
|
||||
{"sectionId":"contributor","name":"sdehaarte","pictureUrl":"https://github.com/sdehaarte.png","profileUrl":"https://github.com/sdehaarte"},
|
||||
{"sectionId":"contributor","name":"MauroDruwel","pictureUrl":"https://github.com/MauroDruwel.png","profileUrl":"https://github.com/MauroDruwel"},
|
||||
{"sectionId":"support","name":"smetsliam","pictureUrl":"https://github.com/smetsliam.png","profileUrl":"https://github.com/smetsliam"},
|
||||
{"sectionId":"support","name":"Sank34","pictureUrl":"https://github.com/Sank34.png","profileUrl":"https://github.com/Sank34"},
|
||||
{"sectionId":"support","name":"FrankVissers","pictureUrl":"https://github.com/FrankVissers.png","profileUrl":"https://github.com/FrankVissers"},
|
||||
{"sectionId":"plugin-dev","name":"Rapid-Fast","pictureUrl":"https://github.com/Rapid-Fast.png","profileUrl":"https://github.com/Rapid-Fast"},
|
||||
{"sectionId":"plugin-dev","name":"NotMukundOP","pictureUrl":"https://github.com/NotMukundOP.png","profileUrl":"https://github.com/NotMukundOP"},
|
||||
{"sectionId":"plugin-dev","name":"Imperatorix17","pictureUrl":"https://github.com/imperatorix17.png","profileUrl":"https://github.com/imperatorix17"},
|
||||
{"sectionId":"plugin-dev","name":"DanoGlez","pictureUrl":"https://github.com/DanoGlez.png","profileUrl":"https://github.com/DanoGlez"},
|
||||
{"sectionId":"plugin-dev","name":"yowsef","pictureUrl":"https://github.com/Yow-sef.png","profileUrl":"https://github.com/Yow-sef"},
|
||||
{"sectionId":"plugin-dev","name":"MeneerSouf","pictureUrl":"https://github.com/MeneerSouf.png","profileUrl":"https://github.com/MeneerSouf"},
|
||||
{"sectionId":"plugin-dev","name":"challenger_nova","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"HanumeshGupta","pictureUrl":"https://github.com/HanumeshGupta.png","profileUrl":"https://github.com/HanumeshGupta"},
|
||||
{"sectionId":"translator","name":"benzorich","pictureUrl":"https://github.com/benzorich.png","profileUrl":"https://github.com/benzorich"},
|
||||
{"sectionId":"translator","name":"Reddishye","pictureUrl":"https://github.com/Reddishye.png","profileUrl":"https://github.com/Reddishye"},
|
||||
{"sectionId":"translator","name":"josuens","pictureUrl":"https://github.com/josuens.png","profileUrl":"https://github.com/josuens"},
|
||||
{"sectionId":"translator","name":"quiradon","pictureUrl":"https://github.com/quiradon.png","profileUrl":"https://github.com/quiradon"},
|
||||
{"sectionId":"translator","name":"Imperatorix17","pictureUrl":"https://github.com/imperatorix17.png","profileUrl":"https://github.com/imperatorix17"},
|
||||
{"sectionId":"translator","name":"NoOneNook","pictureUrl":"https://github.com/NoOneNook.png","profileUrl":"https://github.com/NoOneNook"},
|
||||
{"sectionId":"translator","name":"guillee3","pictureUrl":"https://github.com/guillee3.png","profileUrl":"https://github.com/guillee3"},
|
||||
{"sectionId":"translator","name":"Mods HD","pictureUrl":"https://github.com/mods-hd.png","profileUrl":"https://github.com/mods-hd"},
|
||||
{"sectionId":"translator","name":"anderskiy","pictureUrl":"https://github.com/anderskiy.png","profileUrl":"https://github.com/anderskiy"},
|
||||
{"sectionId":"translator","name":"SpyEye2","pictureUrl":"https://github.com/SpyEye2.png","profileUrl":"https://github.com/SpyEye2"},
|
||||
{"sectionId":"translator","name":"Sank34","pictureUrl":"https://github.com/Sank34.png","profileUrl":"https://github.com/Sank34"},
|
||||
{"sectionId":"translator","name":"thegamer5095","pictureUrl":"https://github.com/thegamer5095.png","profileUrl":"https://github.com/thegamer5095"},
|
||||
{"sectionId":"translator","name":"danoglez","pictureUrl":"https://github.com/danoglez.png","profileUrl":"https://github.com/danoglez"},
|
||||
{"sectionId":"translator","name":"zhavis","pictureUrl":"https://github.com/zhavis.png","profileUrl":"https://github.com/zhavis"},
|
||||
{"sectionId":"translator","name":"yuuslokrobjakkroval","pictureUrl":"https://github.com/yuuslokrobjakkroval.png","profileUrl":"https://github.com/yuuslokrobjakkroval"},
|
||||
{"sectionId":"translator","name":"imLudwig","pictureUrl":"https://github.com/imLudwig.png","profileUrl":"https://github.com/imLudwig"},
|
||||
{"sectionId":"translator","name":"iamnotmega","pictureUrl":"https://github.com/iamnotmega.png","profileUrl":"https://github.com/iamnotmega"},
|
||||
{"sectionId":"translator","name":"Ronalds13424","pictureUrl":"https://github.com/Ronalds13424.png","profileUrl":"https://github.com/Ronalds13424"},
|
||||
{"sectionId":"translator","name":"dysashop","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"fraden1mvp.","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"palestinian","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"challenger_nova","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"erxg","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"tsgindrius","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"kornel0706","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"me.october","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""},
|
||||
{"sectionId":"translator","name":"ngocdiep2006","pictureUrl":"https://apis.dj-dj.be/cdn/openticket/default-avatar.png","profileUrl":""}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 2.4 MiB |
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"_INFO":"This document contains all Open Ticket sponsors.",
|
||||
"SPONSOR_TEMPLATE":{
|
||||
"name":"INSERT_NAME",
|
||||
"pictureUrl":"INSERT_PICTURE_URL",
|
||||
"profileUrl":"INSERT_PROFILE_URL",
|
||||
"sectionId":"INSERT_ID"
|
||||
},
|
||||
"SECTION_TEMPLATE":{
|
||||
"name":"INSERT_NAME",
|
||||
"id":"INSERT_ID",
|
||||
"pfpSize":50,
|
||||
"pfpColumns":5,
|
||||
"withNames":true
|
||||
},
|
||||
"sections":[
|
||||
{
|
||||
"name":"💎 Platinum Sponsors",
|
||||
"id":"platinum",
|
||||
"pfpSize":120,
|
||||
"pfpColumns":4,
|
||||
"withNames":true
|
||||
},
|
||||
{
|
||||
"name":"🥇 Gold Sponsors",
|
||||
"id":"gold",
|
||||
"pfpSize":60,
|
||||
"pfpColumns":8,
|
||||
"withNames":true
|
||||
},
|
||||
{
|
||||
"name":"🥈 Silver Sponsors",
|
||||
"id":"silver",
|
||||
"pfpSize":40,
|
||||
"pfpColumns":16,
|
||||
"withNames":false
|
||||
},
|
||||
{
|
||||
"name":"❤️ Past Sponsors",
|
||||
"id":"past",
|
||||
"pfpSize":30,
|
||||
"pfpColumns":20,
|
||||
"withNames":false
|
||||
}
|
||||
],
|
||||
"sponsors":[
|
||||
{
|
||||
"name":"Guillee3",
|
||||
"pictureUrl":"https://github.com/guillee3.png",
|
||||
"profileUrl":"https://github.com/guillee3",
|
||||
"sectionId":"platinum"
|
||||
},
|
||||
{
|
||||
"name":"Jacob Humston",
|
||||
"pictureUrl":"https://github.com/jacobhumston.png",
|
||||
"profileUrl":"https://github.com/jacobhumston",
|
||||
"sectionId":"platinum"
|
||||
},
|
||||
{
|
||||
"name":"SpyEye2",
|
||||
"pictureUrl":"https://github.com/SpyEye2.png",
|
||||
"profileUrl":"https://github.com/SpyEye2",
|
||||
"sectionId":"gold"
|
||||
},
|
||||
{
|
||||
"name":"DOSEV5",
|
||||
"pictureUrl":"https://github.com/DOSEV5.png",
|
||||
"profileUrl":"https://github.com/DOSEV5",
|
||||
"sectionId":"gold"
|
||||
},
|
||||
{
|
||||
"name":"YeeetSK",
|
||||
"pictureUrl":"https://github.com/YeeetSK.png",
|
||||
"profileUrl":"https://github.com/YeeetSK",
|
||||
"sectionId":"silver"
|
||||
},
|
||||
{
|
||||
"name":"BENZORICH",
|
||||
"pictureUrl":"https://github.com/BENZORICH.png",
|
||||
"profileUrl":"https://github.com/BENZORICH",
|
||||
"sectionId":"silver"
|
||||
},
|
||||
{
|
||||
"name":"Mods HD",
|
||||
"pictureUrl":"https://github.com/mods-hd.png",
|
||||
"profileUrl":"https://github.com/mods-hd",
|
||||
"sectionId":"silver"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 124 KiB |
@@ -1,130 +0,0 @@
|
||||
/// <reference types="node"/>
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import crypto from "crypto"
|
||||
|
||||
const contributorData: {contributors:Contributor[],sections:Section[]} = JSON.parse(fs.readFileSync(path.join(process.cwd(),"./.github/CONTRIBUTORS.json")).toString())
|
||||
|
||||
//CONSTANTS
|
||||
const CORNER_RADIUS = 10
|
||||
const SPACE_MULTIPLIER = 1.2
|
||||
const SVG_WIDTH = 1000
|
||||
|
||||
//TYPES
|
||||
interface Contributor {
|
||||
name:string,
|
||||
pictureUrl:string,
|
||||
profileUrl:string,
|
||||
sectionId:string
|
||||
}
|
||||
interface Section {
|
||||
name:string,
|
||||
id:string,
|
||||
pfpSize:number,
|
||||
pfpColumns:number,
|
||||
withNames:boolean
|
||||
}
|
||||
|
||||
|
||||
//FUNCTIONS
|
||||
async function downloadPfpToBase64URL(url:string){
|
||||
const res = await fetch(url,{method:"GET"})
|
||||
if (!res.ok) return null
|
||||
const buffer = Buffer.from(await res.arrayBuffer())
|
||||
console.log("Downloaded picture URL:",url)
|
||||
return "data:image/png;base64,"+buffer.toString("base64")
|
||||
}
|
||||
|
||||
function createTitle(yPos:number,name:string){
|
||||
return `<text x="${20}" y="${yPos+20}" text-anchor="start" class="contributor-tier-title">${name}</text>`
|
||||
}
|
||||
|
||||
async function createPfp(yPos:number,xPos:number,size:number,contributor:Contributor,withNames:boolean){
|
||||
const randomId = crypto.randomBytes(8).toString("hex")
|
||||
const nameElement = (withNames) ? `<text x="${Math.round(xPos+(size/2))}" y="${yPos+size+20}" text-anchor="middle" fill="currentColor">${contributor.name}</text>` : ""
|
||||
|
||||
return (`<a href="${contributor.profileUrl}" class="contributor-link" target="_blank">
|
||||
<clipPath id="clipPath-${randomId}">
|
||||
<rect x="${xPos}" y="${yPos}" width="${size}" height="${size}" rx="${CORNER_RADIUS}" ry="${CORNER_RADIUS}"/>
|
||||
</clipPath>
|
||||
<image x="${xPos}" y="${yPos}" width="${size}" height="${size}" href="${await downloadPfpToBase64URL(contributor.pictureUrl)}" clip-path="url(#clipPath-${randomId})"/>
|
||||
${nameElement}
|
||||
</a>`)
|
||||
}
|
||||
|
||||
async function generateSection(yPos:number,section:Section,contributors:Contributor[]){
|
||||
let sectionHtml: string = ""
|
||||
sectionHtml += createTitle(yPos,section.name)
|
||||
const nameOffset = (section.withNames) ? 20 : 0
|
||||
|
||||
//divide contributors in rows
|
||||
const groupedContributors: Contributor[][] = []
|
||||
let currentGroup: Contributor[] = []
|
||||
for (const contributor of contributors){
|
||||
currentGroup.push(contributor)
|
||||
if (currentGroup.length == section.pfpColumns){
|
||||
groupedContributors.push(currentGroup)
|
||||
currentGroup = []
|
||||
}
|
||||
}
|
||||
if (currentGroup.length > 0) groupedContributors.push(currentGroup)
|
||||
|
||||
let y = 0
|
||||
for (const contributorGroup of groupedContributors){
|
||||
let x = 0
|
||||
for (const contributor of contributorGroup){
|
||||
const pfpYPos = 40 + yPos + (y * ((section.pfpSize * SPACE_MULTIPLIER) + nameOffset))
|
||||
const pfpXPos = 20 + (x * section.pfpSize * SPACE_MULTIPLIER)
|
||||
sectionHtml += await createPfp(pfpYPos,pfpXPos,section.pfpSize,contributor,section.withNames)
|
||||
x++
|
||||
}
|
||||
y++
|
||||
}
|
||||
|
||||
let sectionHeight: number = 40 + (y * ((section.pfpSize * SPACE_MULTIPLIER) + nameOffset))
|
||||
return {sectionHtml,sectionHeight}
|
||||
}
|
||||
|
||||
async function generateSections(sections:Section[],contributors:Contributor[]){
|
||||
let finalHeight: number = 10
|
||||
let finalHtml: string = ""
|
||||
for (const section of sections){
|
||||
const sectionContributors = contributors.filter((s) => s.sectionId === section.id)
|
||||
if (sectionContributors.length < 1) continue
|
||||
const {sectionHtml,sectionHeight} = await generateSection(finalHeight,section,sectionContributors)
|
||||
|
||||
finalHeight += sectionHeight
|
||||
finalHtml += sectionHtml
|
||||
}
|
||||
|
||||
finalHeight += 10
|
||||
return {finalHeight,finalHtml}
|
||||
}
|
||||
|
||||
function generateFinalHtml(sectionsHtml:string,sectionHeight:number){
|
||||
return (`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 ${SVG_WIDTH} ${sectionHeight}" width="${SVG_WIDTH}" height="${sectionHeight}">
|
||||
<style>
|
||||
text {
|
||||
font-weight: 300;
|
||||
font-size: 14px;
|
||||
fill: #777777;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
.contributor-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
.contributor-tier-title {
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
${sectionsHtml}
|
||||
</svg>`)
|
||||
}
|
||||
|
||||
//GENERATE CONTRIBUTORS SVG
|
||||
async function main(){
|
||||
const {finalHeight,finalHtml} = await generateSections(contributorData.sections,contributorData.contributors)
|
||||
fs.writeFileSync(path.join(process.cwd(),"./.github/CONTRIBUTORS.svg"),generateFinalHtml(finalHtml,finalHeight))
|
||||
}
|
||||
main()
|
||||
@@ -1,132 +0,0 @@
|
||||
/// <reference types="node"/>
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import crypto from "crypto"
|
||||
|
||||
const sponsorData: {sponsors:Sponsor[],sections:Section[]} = JSON.parse(fs.readFileSync(path.join(process.cwd(),"./.github/SPONSORS.json")).toString())
|
||||
|
||||
//CONSTANTS
|
||||
const CORNER_RADIUS = 10
|
||||
const SPACE_MULTIPLIER = 1.2
|
||||
const SVG_WIDTH = 1000
|
||||
|
||||
//TYPES
|
||||
interface Sponsor {
|
||||
name:string,
|
||||
pictureUrl:string,
|
||||
profileUrl:string,
|
||||
sectionId:string
|
||||
}
|
||||
interface Section {
|
||||
name:string,
|
||||
id:string,
|
||||
pfpSize:number,
|
||||
pfpColumns:number,
|
||||
withNames:boolean
|
||||
}
|
||||
|
||||
|
||||
//FUNCTIONS
|
||||
async function downloadPfpToBase64URL(url:string){
|
||||
const res = await fetch(url,{method:"GET"})
|
||||
if (!res.ok) return null
|
||||
const buffer = Buffer.from(await res.arrayBuffer())
|
||||
console.log("Downloaded picture URL:",url)
|
||||
return "data:image/png;base64,"+buffer.toString("base64")
|
||||
}
|
||||
|
||||
function createTitle(yPos:number,name:string){
|
||||
return `<text x="${Math.round(SVG_WIDTH/2)}" y="${yPos+20}" text-anchor="middle" class="sponsor-tier-title">${name}</text>`
|
||||
}
|
||||
|
||||
async function createPfp(yPos:number,xPos:number,size:number,sponsor:Sponsor,withNames:boolean){
|
||||
const randomId = crypto.randomBytes(8).toString("hex")
|
||||
const nameElement = (withNames) ? `<text x="${Math.round(xPos+(size/2))}" y="${yPos+size+20}" text-anchor="middle" fill="currentColor">${sponsor.name}</text>` : ""
|
||||
|
||||
return (`<a href="${sponsor.profileUrl}" class="sponsor-link" target="_blank">
|
||||
<clipPath id="clipPath-${randomId}">
|
||||
<rect x="${xPos}" y="${yPos}" width="${size}" height="${size}" rx="${CORNER_RADIUS}" ry="${CORNER_RADIUS}"/>
|
||||
</clipPath>
|
||||
<image x="${xPos}" y="${yPos}" width="${size}" height="${size}" href="${await downloadPfpToBase64URL(sponsor.pictureUrl)}" clip-path="url(#clipPath-${randomId})"/>
|
||||
${nameElement}
|
||||
</a>`)
|
||||
}
|
||||
|
||||
async function generateSection(yPos:number,section:Section,sponsors:Sponsor[]){
|
||||
let sectionHtml: string = ""
|
||||
sectionHtml += createTitle(yPos,section.name)
|
||||
const nameOffset = (section.withNames) ? 20 : 0
|
||||
|
||||
//divide sponsors in rows
|
||||
const groupedSponsors: Sponsor[][] = []
|
||||
let currentGroup: Sponsor[] = []
|
||||
for (const sponsor of sponsors){
|
||||
currentGroup.push(sponsor)
|
||||
if (currentGroup.length == section.pfpColumns){
|
||||
groupedSponsors.push(currentGroup)
|
||||
currentGroup = []
|
||||
}
|
||||
}
|
||||
if (currentGroup.length > 0) groupedSponsors.push(currentGroup)
|
||||
|
||||
let y = 0
|
||||
for (const sponsorGroup of groupedSponsors){
|
||||
const xOffset = Math.round((SVG_WIDTH - (sponsorGroup.length * section.pfpSize * SPACE_MULTIPLIER))/2)
|
||||
let x = 0
|
||||
for (const sponsor of sponsorGroup){
|
||||
const pfpYPos = 40 + yPos + (y * ((section.pfpSize * SPACE_MULTIPLIER) + nameOffset))
|
||||
const pfpXPos = xOffset + (x * section.pfpSize * SPACE_MULTIPLIER)
|
||||
sectionHtml += await createPfp(pfpYPos,pfpXPos,section.pfpSize,sponsor,section.withNames)
|
||||
x++
|
||||
}
|
||||
y++
|
||||
}
|
||||
|
||||
let sectionHeight: number = 40 + (y * ((section.pfpSize * SPACE_MULTIPLIER) + nameOffset))
|
||||
return {sectionHtml,sectionHeight}
|
||||
}
|
||||
|
||||
async function generateSections(sections:Section[],sponsors:Sponsor[]){
|
||||
let finalHeight: number = 10
|
||||
let finalHtml: string = ""
|
||||
for (const section of sections){
|
||||
const sectionSponsors = sponsors.filter((s) => s.sectionId === section.id)
|
||||
if (sectionSponsors.length < 1) continue
|
||||
const {sectionHtml,sectionHeight} = await generateSection(finalHeight,section,sectionSponsors)
|
||||
|
||||
finalHeight += sectionHeight
|
||||
finalHtml += sectionHtml
|
||||
}
|
||||
|
||||
finalHeight += 10
|
||||
return {finalHeight,finalHtml}
|
||||
}
|
||||
|
||||
function generateFinalHtml(sectionsHtml:string,sectionHeight:number){
|
||||
return (`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 ${SVG_WIDTH} ${sectionHeight}" width="${SVG_WIDTH}" height="${sectionHeight}">
|
||||
<style>
|
||||
text {
|
||||
font-weight: 300;
|
||||
font-size: 14px;
|
||||
fill: #777777;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
.sponsor-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
.sponsor-tier-title {
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
<rect x="2" y="2" width="${SVG_WIDTH-4}" height="${sectionHeight-4}" rx="20" ry="20" style="fill:transparent;stroke:#f8ba00;stroke-width:3"></rect>
|
||||
${sectionsHtml}
|
||||
</svg>`)
|
||||
}
|
||||
|
||||
//GENERATE SPONSORS SVG
|
||||
async function main(){
|
||||
const {finalHeight,finalHtml} = await generateSections(sponsorData.sections,sponsorData.sponsors)
|
||||
fs.writeFileSync(path.join(process.cwd(),"./.github/SPONSORS.svg"),generateFinalHtml(finalHtml,finalHeight))
|
||||
}
|
||||
main()
|
||||
@@ -21,7 +21,7 @@ The bot is fully translated into <b>38+ languages</b> and has been battle-tested
|
||||
|
||||
<h3 align="center"><b>⭐️ Support Open Ticket’s growth by starring this repo! ⭐️</b></h3>
|
||||
<p align="center"><sup>❤️ Love Open Ticket? <a href="https://github.com/sponsors/DJj123dj">Sponsorships</a> help fuel our HTML transcript servers and future features! ❤️</sup><br>
|
||||
<img align="center" src=".github/SPONSORS.svg" alt="Open Ticket" width="800px">
|
||||
<img align="center" src="https://raw.githubusercontent.com/open-discord-bots/hall-of-fame/refs/heads/main/svg/SPONSORS_YELLOW.svg" alt="A list of Open Ticket Sponsors" width="800px">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -33,59 +33,59 @@ The bot is fully translated into <b>38+ languages</b> and has been battle-tested
|
||||
|
||||
### 📌 Features
|
||||
#### Core Features
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-management.svg"></img> **Ticket Management** - Close, reopen, delete, claim or pin tickets with ease.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-commands.svg"></img> **Powerful Commands** - Manage your support system with **30+ commands** for staff & users.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-questions.svg"></img> **Modal Questions** - Ask users **custom questions** before a ticket is created.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-priorities.svg"></img> **Priorities** - Assign **priority levels** to tickets to highlight urgent requests.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-participants.svg"></img> **Participants** - Add or remove participants & transfer ownership from one user to another.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-adjustments.svg"></img> **Adjustments** - Rename tickets, change ticket types or transfer ownership.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-blacklist.svg"></img> **Blacklist & Limits** - Prevent users from creating tickets and set per-user or global ticket limits.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-customisable.svg"></img> **Highly Customisable** - Configure **350+ settings** covering appearance and behaviour.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-management.svg"></img> **Ticket Management** - Close, reopen, delete, claim or pin tickets with ease.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-commands.svg"></img> **Powerful Commands** - Manage your support system with **30+ commands** for staff & users.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-questions.svg"></img> **Modal Questions** - Ask users **custom questions** before a ticket is created.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-priorities.svg"></img> **Priorities** - Assign **priority levels** to tickets to highlight urgent requests.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-participants.svg"></img> **Participants** - Add or remove participants & transfer ownership from one user to another.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-adjustments.svg"></img> **Adjustments** - Rename tickets, change ticket types or transfer ownership.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-blacklist.svg"></img> **Blacklist & Limits** - Prevent users from creating tickets and set per-user or global ticket limits.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-customisable.svg"></img> **Highly Customisable** - Configure **350+ settings** covering appearance and behaviour.
|
||||
|
||||
#### Ticket Automation & Workflows
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-unlimited.svg"></img> **Unlimited Possibilities** - Create unlimited tickets, panels & question flows.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-autoclose.svg"></img> **Autoclose Tickets** - Automatically **close tickets** after predefined conditions.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-autodelete.svg"></img> **Autodelete Tickets** - Automatically **delete closed tickets** to keep channels clean.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-categories.svg"></img> **Category Routing** - Move tickets between categories based on claim or close state.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-unlimited.svg"></img> **Unlimited Possibilities** - Create unlimited tickets, panels & question flows.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-autoclose.svg"></img> **Autoclose Tickets** - Automatically **close tickets** after predefined conditions.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-autodelete.svg"></img> **Autodelete Tickets** - Automatically **delete closed tickets** to keep channels clean.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/automation-categories.svg"></img> **Category Routing** - Move tickets between categories based on claim or close state.
|
||||
|
||||
#### Transcripts & Insights
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/insights-transcripts.svg"></img> **HTML Transcripts** - Generate beautiful, easy-to-read **HTML transcripts** for every ticket.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/insights-stats.svg"></img> **Detailed Statistics** - Track **50+ statistics** for tickets, users and server activity.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/insights-logs.svg"></img> **Ticket Logs** - Track **all ticket events** such as creation, closures, and staff actions.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/insights-transcripts.svg"></img> **HTML Transcripts** - Generate beautiful, easy-to-read **HTML transcripts** for every ticket.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/insights-stats.svg"></img> **Detailed Statistics** - Track **50+ statistics** for tickets, users and server activity.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/insights-logs.svg"></img> **Ticket Logs** - Track **all ticket events** such as creation, closures, and staff actions.
|
||||
|
||||
#### User Experience
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-translated.svg"></img> **Fully Translated** - Available in **38+ languages**, translated and maintained by the community.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-interactions.svg"></img> **Modern Interactions** - Full support for buttons, dropdowns, slash/text commands & modals.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-panels.svg"></img> **Panels** - Create messages with buttons or a dropdown for users to open tickets.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-sub-panels.svg"></img> **Sub-Panels** - One panel not enough? Use multiple panels to offer more choices.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-translated.svg"></img> **Fully Translated** - Available in **38+ languages**, translated and maintained by the community.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-interactions.svg"></img> **Modern Interactions** - Full support for buttons, dropdowns, slash/text commands & modals.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-panels.svg"></img> **Panels** - Create messages with buttons or a dropdown for users to open tickets.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ux-sub-panels.svg"></img> **Sub-Panels** - One panel not enough? Use multiple panels to offer more choices.
|
||||
|
||||
#### Plugins & Ecosystem
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-plugins.svg"></img> **Plugin System** - Use custom plugins to **add new features** or **modify existing behavior** of the bot.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-community.svg"></img> **Community Plugins** - Use and share plugins built by the community.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-api.svg"></img> **Advanced API** - Build advanced plugins with access to ticket events and internal systems.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-integrations.svg"></img> **Integrations** - Connect Open Ticket with external services to automate workflows across platforms.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-bonus.svg"></img> **Bonus Features** - Somehow, we included Reaction Roles and URL Button support as well.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-plugins.svg"></img> **Plugin System** - Use custom plugins to **add new features** or **modify existing behavior** of the bot.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-community.svg"></img> **Community Plugins** - Use and share plugins built by the community.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-api.svg"></img> **Advanced API** - Build advanced plugins with access to ticket events and internal systems.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-integrations.svg"></img> **Integrations** - Connect Open Ticket with external services to automate workflows across platforms.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/ecosystem-bonus.svg"></img> **Bonus Features** - Somehow, we included Reaction Roles and URL Button support as well.
|
||||
|
||||
#### Deployment
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-quick.svg"></img> **Quick Setup** - Easy **5-minute configuration** using the Interactive Setup CLI.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-scale.svg"></img> **Scalable & Reliable** - Battle-tested in servers with **100k+ members**.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-secure.svg"></img> **Private & Secure** - Used by thousands of servers with respect for security & privacy.
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-pterodactyl.svg"></img> **Pterodactyl Support** - 100% compatible with Pterodactyl panels. [(Download official eggs)](.eggs/README.md)
|
||||
- <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-docker.svg"></img> **Docker Support** - Deploy Open Ticket in minutes with Docker containers.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-quick.svg"></img> **Quick Setup** - Easy **5-minute configuration** using the Interactive Setup CLI.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-scale.svg"></img> **Scalable & Reliable** - Battle-tested in servers with **100k+ members**.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-secure.svg"></img> **Private & Secure** - Used by thousands of servers with respect for security & privacy.
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-pterodactyl.svg"></img> **Pterodactyl Support** - 100% compatible with Pterodactyl panels. [(Download official eggs)](.eggs/README.md)
|
||||
- <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/deployment-docker.svg"></img> **Docker Support** - Deploy Open Ticket in minutes with Docker containers.
|
||||
|
||||
#### Extend functionality even more with our [pre-made community plugins](#-plugins)!
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-reviews.svg"></img> **Reviews** - Create and manage a support review system for tickets.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-tags.svg"></img> **Tags** - Define keywords that automatically trigger predefined responses.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-reminders.svg"></img> **Reminders** - Create and manage custom reminders for users or staff.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-ai.svg"></img> **AI Integrations** - Connect to AI providers such as ChatGPT, Claude, or Gemini.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-display.svg"></img> **Channel Display** - Create voice channels that display real-time ticket system statistics.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-forms.svg"></img> **Forms** - Build advanced forms for collecting structured information from users.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-embeds.svg"></img> **Custom Embeds** - Create and send custom embeds via commands.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-customisable.svg"></img> **Customization Tools** - Additional configuration options for advanced behavior and styling.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-dashboard.svg"></img> **Web Dashboard** - Configure and manage the bot through a remote web dashboard.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-feedback.svg"></img> **Feedback** - Collect user feedback after ticket deletion using forms.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-sqlite.svg"></img> **SQLite Database** - Use an SQLite backend for improved performance and lightweight storage.
|
||||
> - <img align="center" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-more.svg"></img> **And more** - Additional community plugins are available and actively expanding.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-reviews.svg"></img> **Reviews** - Create and manage a support review system for tickets.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-tags.svg"></img> **Tags** - Define keywords that automatically trigger predefined responses.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-reminders.svg"></img> **Reminders** - Create and manage custom reminders for users or staff.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-ai.svg"></img> **AI Integrations** - Connect to AI providers such as ChatGPT, Claude, or Gemini.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-display.svg"></img> **Channel Display** - Create voice channels that display real-time ticket system statistics.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-forms.svg"></img> **Forms** - Build advanced forms for collecting structured information from users.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-embeds.svg"></img> **Custom Embeds** - Create and send custom embeds via commands.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/core-customisable.svg"></img> **Customization Tools** - Additional configuration options for advanced behavior and styling.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-dashboard.svg"></img> **Web Dashboard** - Configure and manage the bot through a remote web dashboard.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-feedback.svg"></img> **Feedback** - Collect user feedback after ticket deletion using forms.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-sqlite.svg"></img> **SQLite Database** - Use an SQLite backend for improved performance and lightweight storage.
|
||||
> - <img align="top" src="https://apis.dj-dj.be/cdn/openticket/readme-icons/plugin-more.svg"></img> **And more** - Additional community plugins are available and actively expanding.
|
||||
|
||||
## ⏱️ Quick Start
|
||||
> 1. Download the [latest version of Open Ticket](https://github.com/open-discord-bots/open-ticket/releases/latest).
|
||||
@@ -166,7 +166,7 @@ With the amazing support of our translators, we've been able to translate Open T
|
||||
<!--[⭐ Contribute!](.github/CONTRIBUTING.md) -->
|
||||
|
||||
## 😎 Hall Of Fame
|
||||
<img alt="The full list of contributors for Open Ticket and Open Discord." src=".github/CONTRIBUTORS.svg">
|
||||
<img alt="The full list of contributors for Open Ticket and Open Discord." src="https://raw.githubusercontent.com/open-discord-bots/hall-of-fame/refs/heads/main/svg/CONTRIBUTORS.svg">
|
||||
|
||||
## ⭐️ Star History
|
||||
If you enjoy using Open ticket, **consider starring** our repository.
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
"testsetup": "node index.js --cli --dev-config --dev-database --soft-plugins",
|
||||
"testnc": "node index.js --no-compile --dev-config --dev-database --soft-plugins",
|
||||
"tools:mergelang": "bun run .tools/mergeTranslations.js",
|
||||
"tools:sponsors": "bun run .tools/createSponsors.ts",
|
||||
"tools:contributors": "bun run .tools/createContributors.ts",
|
||||
"docker:build": ".tools/build-docker.sh djj123dj/open-ticket --no-push"
|
||||
},
|
||||
"type": "module",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Example Plugin
|
||||
A simple example of an Open Ticket v4 plugin!
|
||||
A basic example plugin for developers that want to create their own plugin.
|
||||
|
||||
> Use this plugin as a starter template for all your custom plugins!
|
||||
@@ -3,7 +3,7 @@
|
||||
"id":"example-plugin",
|
||||
"version":"1.0.0",
|
||||
"startFile":"index.ts",
|
||||
"supportedVersions":["OTv4.0.x","OTv4.1.x","OTv4.2.x"],
|
||||
"supportedVersions":["OTv4.2.x"],
|
||||
|
||||
"enabled":false,
|
||||
"priority":0,
|
||||
@@ -16,8 +16,8 @@
|
||||
"details":{
|
||||
"author":"DJj123dj",
|
||||
"contributors":[],
|
||||
"shortDescription":"A simple template for an Open Ticket v4 plugin!",
|
||||
"longDescription":"A simple example of an Open Ticket v4 plugin!",
|
||||
"shortDescription":"A basic example plugin for developers that want to create their own plugin.",
|
||||
"longDescription":"A basic example plugin for developers that want to create their own plugin.",
|
||||
"imageUrl":"",
|
||||
"projectUrl":"",
|
||||
"tags":["template","example","default"]
|
||||
|
||||
Reference in New Issue
Block a user