Discord simple API
Project description
==============
discord_simple
==============
.. image:: https://img.shields.io/pypi/v/discord_simple.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/discord_simple
:alt: PyPi Package Version
.. image:: https://img.shields.io/pypi/pyversions/discord_simple.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/discord_simple
:alt: Supported python versions
.. image:: https://travis-ci.org/askovpen/discord_simple.svg?branch=master
:target: https://travis-ci.org/askovpen/discord_simple
:alt: Travis CI Status
----------
Installing
----------
.. code:: shell
$ pip install discord_simple --upgrade
-----
Usage
-----
.. code:: python
import discord_simple
bot=None
def on_connect(user):
print("connected as "+user)
def on_message(message):
print("message from {}: {}".format(message.author,message.content))
bot = discord_simple.Bot("your token",on_connect=on_connect,on_message=on_message)
bot.forever_loop()
---
API
---
User
----
* ``id``
* ``avatar``
* ``username``
* ``discriminator``
Message
-------
* ``author`` : `User`_
* ``content`` : Message text
* ``timestamp``
Methods
-------
* ``send_message('username#discriminator','message')``
discord_simple
==============
.. image:: https://img.shields.io/pypi/v/discord_simple.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/discord_simple
:alt: PyPi Package Version
.. image:: https://img.shields.io/pypi/pyversions/discord_simple.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/discord_simple
:alt: Supported python versions
.. image:: https://travis-ci.org/askovpen/discord_simple.svg?branch=master
:target: https://travis-ci.org/askovpen/discord_simple
:alt: Travis CI Status
----------
Installing
----------
.. code:: shell
$ pip install discord_simple --upgrade
-----
Usage
-----
.. code:: python
import discord_simple
bot=None
def on_connect(user):
print("connected as "+user)
def on_message(message):
print("message from {}: {}".format(message.author,message.content))
bot = discord_simple.Bot("your token",on_connect=on_connect,on_message=on_message)
bot.forever_loop()
---
API
---
User
----
* ``id``
* ``avatar``
* ``username``
* ``discriminator``
Message
-------
* ``author`` : `User`_
* ``content`` : Message text
* ``timestamp``
Methods
-------
* ``send_message('username#discriminator','message')``
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
discord_simple-0.0.1.16.tar.gz
(16.6 kB
view hashes)
Built Distributions
discord_simple-0.0.1.16-py3.4.egg
(10.8 kB
view hashes)
discord_simple-0.0.1.16-py2.7.egg
(10.5 kB
view hashes)
Close
Hashes for discord_simple-0.0.1.16-py3.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d9898544426189d172b1864e122be4800e1c3f3823dd5c7ec195336324c8a14 |
|
MD5 | 99570057f6af77b63e543b491c1126ba |
|
BLAKE2b-256 | 5f460bb5a91903d445a22c5d6d05593456daca3b9a169a2df8e7334510081a0d |
Close
Hashes for discord_simple-0.0.1.16-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc1809a779b2ff9cc0de93a4725f6c8a5a666edb87ccc9041434a50dac55f8a1 |
|
MD5 | 39ac7c6045187326919887d97073790a |
|
BLAKE2b-256 | 3048c9ff5eb959a0a8b63625d0deb222a3ff81e50bf3f2233b539d0865afa848 |
Close
Hashes for discord_simple-0.0.1.16-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | f78a5b472230ffbb0e70a6c9824cb1c6848c963a0886d9a5564d3d64ffbbde83 |
|
MD5 | 6b5bb718fde5c98736bea8f6ff555b3b |
|
BLAKE2b-256 | 38e86c146f7ea334a97aea6c1b09d37afda2145dd5d626505faa03eba78bc041 |