Skip to content

Instantly share code, notes, and snippets.

@Zwork101
Created December 8, 2018 14:59
Show Gist options
  • Save Zwork101/b38a1cd418d7d21ccb94f16c4475dc27 to your computer and use it in GitHub Desktop.
Save Zwork101/b38a1cd418d7d21ccb94f16c4475dc27 to your computer and use it in GitHub Desktop.
Pycord Example
from pycord.client import Client
client = Client(">>")
client.load_extensions([
"test_extension.TestExtension"
])
client.run()
# client = pycord.client.client.Client("!")
#
# emoji = pycord.models.Emoji(client, {
# "id": "41771983429993937",
# "name": "LUL",
# "roles": [ "41771983429993000", "41771983429993111" ],
# "user": {
# "username": "Luigi",
# "discriminator": "0002",
# "id": "96008815106887111",
# "avatar": "5500909a3274e1812beb4e8de6631111"
# },
# "require_colons": True,
# "managed": False,
# "animated": False
# })
from pycord.client import PycordExtentsion
from pycord.models import Message
class TestExtension(PycordExtentsion):
@PycordExtentsion.command("ping", "*|name/str| |thing/int|")
async def test(name: str, thing: int=None):
print(Message.content, Message.id)
print(name, thing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment