Skip to main content

Restcord is a rest API wrapper for the Discord API, but this one doesn't include WebSockets, this is for people who dont want websockets but only make requests to the api.

Project description

PyPI PyPI2

Restcord is a rest API wrapper for the Discord API, but this one doesn’t include WebSockets, this is for people who dont want websockets but only make requests to the api.

Breaking Changes

The discord API is constantly changing and the wrapper API is as well.

Installing

To install the library, you can just run the following command:

pip install -U restcord

Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. apt, yum, etc) before running the above command:

  • python-dev (e.g. python3.5-dev for Python 3.5)

Quick Example

import restcord
import asyncio

loop = asyncio.get_event_loop()
client = restcord.Restcord(token="Your token here")

async def test():
    guild = await client.get_guild("Some guild id of a guild that ur bot/user account is in")
    print(guild.__dict__)

loop.run_until_complete(test())

For user accounts:

import restcord
import asyncio

loop = asyncio.get_event_loop()
client = restcord.Restcord(token="Your token here", selfbot=True)

async def test():
    guild = await client.get_guild("Some guild id of a guild that ur bot/user account is in")
    print(guild.__dict__)

loop.run_until_complete(test())

Requirements

  • Python 3.4.2+ (There will be no effort to add support for lower versions)

  • aiohttp library

Usually pip will handle these for you.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Restcord-1.0.4.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file Restcord-1.0.4.tar.gz.

File metadata

  • Download URL: Restcord-1.0.4.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Restcord-1.0.4.tar.gz
Algorithm Hash digest
SHA256 2deb897b63792472e8fe73b54ed2f0b49f2fa404d2b6bb9f3fa89109999cb789
MD5 9c24854b018db84a138abcd1b28f91c1
BLAKE2b-256 c8183b91b5bf0f2fcd4ba5fffdc40bc945a4aefeabdb76d265ef91d7fa78ab1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page