2015-08-21 22:02:03 -04:00
2015-08-21 18:18:34 -04:00
2015-08-21 18:24:04 -04:00
2015-08-21 18:18:34 -04:00
2015-08-21 18:18:34 -04:00

PyDiscord

PyDiscord is an API wrapper for Discord written in Python.

This was written to allow easier writing of bots or chat logs.

This module is alpha!

The discord API is constantly changing and the wrapper API is as well. There will be no effort to keep backwards compatibility.

Quick Example

import discord

client = discord.Client()
client.login('email', 'password')

@client.event
def on_message(message):
    if message.content.startswith('!hello'):
        client.send_message(message.channel, 'Hello was received!')

@client.event
def on_ready():
    print('Logged in as')
    print(client.user.name)
    print(client.user.id)
    print('------')

client.run()

You can find examples in the examples directory.

Requirements

  • Python 2.7+ or Python 3.3+.
  • ws4py library
  • requests library

Usually pip will handle these for you.

Languages
Python 100%