PHP Classes

File: examples/06-sharding.php

Recommend this page to a friend!
  Packages of Max   Fenrir   examples/06-sharding.php   Download  
File: examples/06-sharding.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Fenrir
Use Discord services using the Web services API
Author: By
Last change:
Date: 4 months ago
Size: 377 bytes
 

 

Contents

Class file image Download
<?php

use Ragnarok\Fenrir\Bitwise\Bitwise;
use Ragnarok\Fenrir\Discord;
use Ragnarok\Fenrir\Gateway\Shard;

require './vendor/autoload.php';

$discord = new Discord(
    'TOKEN'
);

$discord
    ->withGateway(Bitwise::from(
        // ...
    ))
    ->withRest();

$discord->gateway->shard(new Shard(1, 16));

$discord->gateway->open(); // Nothing after this line is executed