Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • 6383bec560ef7b376ddf30f7a77f4ae02f9dfa47
  • master par défaut protégée
  • rust-playlist-sync
  • rust
  • fix-qt-deprecated-qvariant-type
  • fix-mpris-qtwindow-race-condition
  • rust-appimage-wayland
  • windows-build-rebased
  • v2.5 protégée
  • v2.4 protégée
  • v2.3-1 protégée
  • v2.3 protégée
  • v2.2 protégée
  • v2.1 protégée
  • v2.0 protégée
  • v1.8-3 protégée
  • v1.8-2 protégée
  • v1.8-1 protégée
  • v1.8 protégée
  • v1.7 protégée
  • v1.6 protégée
  • v1.5 protégée
  • v1.4 protégée
  • v1.3 protégée
  • v1.2 protégée
  • v1.1 protégée
  • v1.0 protégée
27 résultats

module_sdl2.c

Blame
  • index.js 1,01 Kio
    const { Client } = require('discord.js');
    const dotenv = require('dotenv');
    const handleCommand = require("./corps");
    
    dotenv.config();
    
    const client = new Client({intents: ["GUILDS" , "GUILD_MESSAGES", "GUILD_MEMBERS"]});
    client.login(process.env.DISCORDJS_BOT_TOKEN);
    client.on('ready', () => {
        console.log('CamBot (Pipo ?) est dans la place !');
    });
    
    const PREFIX = "$";
    
    
    client.on('messageCreate', (message) => {
        
        if (message.author.bot) return;
    
        if (message.content.startsWith(PREFIX)) {
            const [ cmdName, ...args] = message.content
                .trim()
                .substring(PREFIX.length)
                .split(/ +/);
            handleCommand(message,cmdName, args); // Main function of corps.js
    
        } 
        
        else { //TROLL SECTION STARTS HERE
            
            const matches = message.content.match(/(\w+) va nous danser/);
    
            if (matches !== null) {
                const username = matches[1];
                message.channel.send("La danse du Limousin !");
            }
    
        } //TROLL SECTION FINISHES HERE
    });