# Introduction

This GitBook is for documenting the phBot plugin API.

### What is Python?

From [Wikipedia](https://en.wikipedia.org/wiki/Python_\(programming_language\)):

> Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java.

Python 3.4/3.8 was chosen for the plugin system because it is easy to learn and does not require a compiler. Simply save your script inside the `Plugins` folder and launch the bot. Done!

### Where can I get help?

There is a forum section dedicated to plugins where you can publish your plugins and get help if you require it. <https://forum.projecthax.com/c/phbot/plugins/11>

You may also join our [Discord ](https://discord.com/channels/722060739765862410/722073386099933278/811643022114422814)and ask your questions there!

### What can I do with the plugin system?

I have made many functions available to Python. These functions allow you to get all players near you, get all NPCs/teleporters near you, and much more. You can do anything you want with the data. It's all up to you.

For example, a chat API is available; with this you can send messages to all nearby players.

### What do I need to get started?

You'll need the new stable release of phBot and the `python34` scripts which you can get by clicking [here](https://projecthax.com/showthread.php?t=14618). It comes with an example script named `example.py`, which can be deleted.

## phBot

* [Purchase](https://phbot.org/phbot/)
* [Guide](http://guide.phbot.org/)
* [Download](https://phbot.org/download/)

## Socials

* [Twitter](https://twitter.com/projecthax)
* [Facebook](https://facebook.com/projecthax)
* [Discord](https://discord.com/invite/e97chmQ)

## Learning Python

It is not necessary to install Python for phBot plugins to function.

* [Download](https://www.python.org/downloads/)
* [Python Documentation](https://docs.python.org/3/)
* [Code Academy](https://www.codecademy.com/en/tracks/python)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://plugins.phbot.org/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
