Created
December 8, 2018 14:59
-
-
Save Zwork101/b38a1cd418d7d21ccb94f16c4475dc27 to your computer and use it in GitHub Desktop.
Pycord Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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