Add Pipeline Support
Some checks failed
Subsonics - Pipeline/pipeline/head There was a failure building this commit
Some checks failed
Subsonics - Pipeline/pipeline/head There was a failure building this commit
This commit is contained in:
parent
31ba11951b
commit
d8c11761cd
34
Jenkinsfile
vendored
Normal file
34
Jenkinsfile
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('[Subsonics] - Test') {
|
||||
steps {
|
||||
script {
|
||||
echo "[Subsonics-Deploy] - Test Stage"
|
||||
sh "rm -rf subsonics"
|
||||
sh "git clone https://git.raphix.fr/raphix/subsonics.git"
|
||||
sh "cd subsonics"
|
||||
sh "npm i"
|
||||
sh "ENV='TEST' node bin/www"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
stage('[Subsonics] - Déploiement') {
|
||||
steps {
|
||||
script {
|
||||
|
||||
def doesJavaRock = input(message: 'Confirmation de Déploiement', ok: 'Déployer')
|
||||
echo "[Subsonics-Deploy] - Deploy Stage"
|
||||
sh "ssh raphix@raphix.fr sudo apt update -y"
|
||||
sh "ssh raphix@raphix.fr sudo apt upgrade -y"
|
||||
sh "ssh raphix@raphix.fr sudo -S -u gitlab-ci /home/gitlab-ci/subsonics_deploy.sh"
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "subsonics-discord",
|
||||
"author": "Raphix",
|
||||
"version": "4.0",
|
||||
"version": "5.0",
|
||||
"dependencies": {
|
||||
"discord.js": "^14.9.0",
|
||||
"erela.js": "^2.4.0",
|
||||
|
41
src/commands/restart.js
Normal file
41
src/commands/restart.js
Normal file
@ -0,0 +1,41 @@
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("restart")
|
||||
.setDescription("Redémarre le bot !"),
|
||||
|
||||
async execute(client, interaction) {
|
||||
|
||||
console.log(interaction.member._roles)
|
||||
|
||||
if(interaction.member._roles.includes("397725956598530050") == true | interaction.member._roles.includes("397724656548970508") == true| interaction.member._roles.includes("397725128198455299") == true| interaction.member._roles.includes("397725552968204288") == true | interaction.member.user.id == "486943594893017119") {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xffffff)
|
||||
.setTitle('Redémarrage du bot !')
|
||||
.setDescription("Vérifie le redémarrage avec /play et si cela ne fonctionne pas, SPAM <@486943594893017119> !!!")
|
||||
.setTimestamp();
|
||||
|
||||
|
||||
interaction.reply({embeds: [embed]})
|
||||
|
||||
functionWhoAbort()
|
||||
|
||||
} else {
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xff0303)
|
||||
.setTitle('Erreur : Redémarrage du BOT')
|
||||
.setTimestamp();
|
||||
const song_show = {name: "Tu n'as pas la permission de faire cela !", value: "Verbotten !"}
|
||||
|
||||
embed.addFields(song_show)
|
||||
interaction.reply({embeds: [embed]})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,13 @@
|
||||
let tryTime = 0;
|
||||
|
||||
if ("ENV" in process.env) {
|
||||
if(process.env.ENV == "TEST") {
|
||||
process.exit(0)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function startApp() {
|
||||
|
||||
const { Client, GatewayIntentBits, Collection } = require("discord.js")
|
||||
|
Loading…
x
Reference in New Issue
Block a user