Exemplo n.º 1
0
def test_type_user_valid_uppercase(discord, client):
    @discord.command(name="TEST USER", type=ApplicationCommandType.USER)
    def fn(ctx, user):
        return "hi user"

    assert client.run("TEST USER").content == "hi user"
Exemplo n.º 2
0
def test_type_message_valid_uppercase(discord, client):
    @discord.command(name="TEST MSG", type=ApplicationCommandType.MESSAGE)
    def fn(ctx, message):
        return "message"

    assert client.run("TEST MSG").content == "message"
Exemplo n.º 3
0
def test_provided_name(discord, client):
    @discord.command(name="other")
    def fn(ctx):
        return "hi"

    assert client.run("other").content == "hi"