PHP code example of vengine / discord-core

1. Go to this page and download the library: Download vengine/discord-core library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vengine / discord-core example snippets




$_SERVER['base.dir'] = __DIR__; // base.dir lConfigPath' => __DIR__ . '/config/global.config.php',
    'discordOptions' => [
        'intents' => Intents::getAllIntents(),
        'token' => '****',
        'dnsConfig' => '1.1.1.1',
    ],
    'overrideComponents' => [
        'name' => Component::class,
    ],
    'discordEvents' => [
        'ready' => Event::class,
    ]
]);

Bootstrap::init($configurator)->run();




return [
    'databaseParams' => [
        'dbType' => 'pdo_mysql',
        'dbHost' => 'localhost',
        'dbName' => 'bot',
        'dbLogin' => 'user',
        'dbPassword' => 'password'
    ],
    'symbolCommand' => '~',
    'useNewCommandSystem' => true,
    'install.dir' => __DIR__ . '/migrations/install/',
];