<commit_before>---
title: Examples
---
---
## Basic Example

This example just creates a client, and grabs a guild object by ID.

```php
<?php

include __DIR__.'/vendor/autoload.php';

use Restcord\DiscordClient;

$discord = new DiscordClient(['token' => 'bot-token']); // Token is required

var_dump($discord->guild->getGuild(['guild.id' => 81384788765712384]));
```
---
## Send Message

In order to send a message, your bot needs to have connected to Discords websocket gateway at least once.
This is not something you can do with this library. 

```php
<?php

include __DIR__.'/vendor/autoload.php';

use Restcord\DiscordClient;

$discord = new DiscordClient(['token' => 'bot-token']); // Token is required

var_dump($discord->guild->getGuild(['guild.id' => 81384788765712384]));
```
---<commit_msg>Adding examples<commit_after>---
title: Examples
---

---

## Basic Example

This example just creates a client, and grabs a guild object by ID.

```php
<?php

include __DIR__.'/vendor/autoload.php';

use Restcord\DiscordClient;

$discord = new DiscordClient(['token' => 'bot-token']); // Token is required

var_dump($discord->guild->getGuild(['guild.id' => 81384788765712384]));
```

---

## Send Message

In order to send a message, your bot needs to have connected to Discords websocket gateway at least once.
This is not something you can do with this library. 

```php
<?php

include __DIR__.'/vendor/autoload.php';

use Restcord\DiscordClient;

$discord = new DiscordClient(['token' => 'bot-token']); // Token is required

var_dump($discord->guild->getGuild(['guild.id' => 81384788765712384]));
```

---

{'fraction_non_alphanumeric': 0.1588089330024814, 'fraction_numerical': 0.04218362282878412, 'mean_word_length': 4.341059602649007, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7272296', 'n_tokens_mistral': 587, 'n_tokens_neox': 525, 'n_words': 159}