Compare commits
2 Commits
cc8bb0a3ab
...
ad75090e15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad75090e15 | ||
|
|
890c979ee9 |
25
.gitea/workflows/config.yaml
Normal file
25
.gitea/workflows/config.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
name: Gitea Discord Bot CI
|
||||||
|
run-name: ${{ github.actor }} has updated
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
Explore-Gitea-Actions:
|
||||||
|
runs-on: linux_arm
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- run: cp -r ./* /home/meridian/meridian-bot/
|
||||||
|
- run: node /home/meridian/meridian-bot/deploy-commands.js
|
||||||
|
- run: sudo systemctl stop discord-bot
|
||||||
|
- run: sudo systemctl start discord-bot
|
||||||
|
# - name: Build TinaCMS
|
||||||
|
# env:
|
||||||
|
# TINA_PUBLIC_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
|
||||||
|
# TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
|
||||||
|
# run: npx tinacms build
|
||||||
|
#- name: Hugo setup
|
||||||
|
# uses: peaceiris/actions-hugo@v2
|
||||||
|
# with:
|
||||||
|
# hugo-version: '0.119.0'
|
||||||
|
# extended: true
|
||||||
|
#- run: hugo --minify
|
||||||
|
#- run: touch /var/www/my_webapp/test.md
|
||||||
43
commands/general/mod.js
Normal file
43
commands/general/mod.js
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
const { SlashCommandBuilder, AttachmentBuilder, EmbedBuilder } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
data: new SlashCommandBuilder()
|
||||||
|
.setName('mod')
|
||||||
|
.setDescription('Get a mod file from a specific game.')
|
||||||
|
.addStringOption(option =>
|
||||||
|
option
|
||||||
|
.setName('mod')
|
||||||
|
.setDescription('Télécharger le fichier moddé d\'un jeu')
|
||||||
|
.setRequired(true)
|
||||||
|
.addChoices(
|
||||||
|
{ name: 'Minecraft', value: 'mods/minecraft.zip' },
|
||||||
|
{ name: 'Valheim', value: 'mods/valheim.r2z' },
|
||||||
|
{ name: 'Lethal Company', value: 'mods/lethal.r2z' },
|
||||||
|
),),
|
||||||
|
async execute(interaction) {
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
|
const mod = interaction.options.getString('mod') ?? 'default';
|
||||||
|
|
||||||
|
if (mod == 'default'){
|
||||||
|
interaction.editReply('Désolé, je ne connais pas ce jeu !')
|
||||||
|
}
|
||||||
|
|
||||||
|
const file = new AttachmentBuilder(mod);
|
||||||
|
|
||||||
|
if (mod.split('.')[mod.split('.').length - 1] == 'r2z') {
|
||||||
|
tuto = '1. Installer r2modman\n2. Sélectionne le jeu dans la liste\n3.Importe un nouveau profil via fichier\n4. Sélectionne le fichier téléchargé puis lance le jeu en Modded !'
|
||||||
|
} else {
|
||||||
|
tuto = '1. Installer CurseForge\n2. Créer un nouveau profil puis utiliser le fichier téléchargé pour importer les mods\n3. Lancer le profil puis lancer Minecraft via le Launcher lancé.'
|
||||||
|
}
|
||||||
|
|
||||||
|
interaction.editReply({ embeds:
|
||||||
|
[
|
||||||
|
new EmbedBuilder().setTitle('Fichier à importer')
|
||||||
|
.addFields(
|
||||||
|
{ name: 'Installation', value: tuto}
|
||||||
|
)
|
||||||
|
], files: [file]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -69,7 +69,6 @@ module.exports = {
|
||||||
{ name: "Vos jets :", value: resultText },
|
{ name: "Vos jets :", value: resultText },
|
||||||
{ name: "Votre résultat est...", value: result.toString() }
|
{ name: "Votre résultat est...", value: result.toString() }
|
||||||
)
|
)
|
||||||
// .setImage('attachment://'+file)
|
|
||||||
], files: [file]
|
], files: [file]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
19
commands/general/uploadmod.js
Normal file
19
commands/general/uploadmod.js
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
const { SlashCommandBuilder } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
data: new SlashCommandBuilder()
|
||||||
|
.setName('uploadmod')
|
||||||
|
.setDescription('Upload a mod file for a specific game.'),
|
||||||
|
async execute(interaction) {
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
|
//logic
|
||||||
|
|
||||||
|
interaction.editReply({ embeds:
|
||||||
|
[
|
||||||
|
new EmbedBuilder()
|
||||||
|
.setTitle("File")
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
};
|
||||||
BIN
mods/lethal.r2z
Normal file
BIN
mods/lethal.r2z
Normal file
Binary file not shown.
BIN
mods/minecraft.zip
Normal file
BIN
mods/minecraft.zip
Normal file
Binary file not shown.
BIN
mods/valheim.r2z
Normal file
BIN
mods/valheim.r2z
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user