Ejemplo n.º 1
0
async def test_wrong_command(bot):
    r = "qsddqsd"
    await dpytest.message(f"{PREFIX} {r}")
    message = dpytest.get_message(peek=False)
    assert len(message.embeds) == 1
    assert ErrorMessages.COMMAND_NOT_FOUND.format(
        r) in message.embeds[0].description
Ejemplo n.º 2
0
async def test_get_message(bot):
    """Dont use this in your code, it's just dummy test.
    Use verify_message() instead of 'get_message' and 'message.content'
    """
    guild = bot.guilds[0]
    channel = guild.text_channels[0]

    await channel.send("Test Message")
    mess = dpytest.get_message()
    assert mess.content == "Test Message"
Ejemplo n.º 3
0
async def test_get_message_peek(bot):
    """Dont use this in your code, it's just dummy test.
    Use verify_message() instead of 'get_message' and 'message.content'
    """
    guild = bot.guilds[0]
    channel = guild.text_channels[0]

    await channel.send("Test Message Peek")
    mess = dpytest.get_message(
        peek=True)  # peek doesnt remove the message from the queue
    assert mess.content == "Test Message Peek"
Ejemplo n.º 4
0
async def test_pandalea(bot):
    await dpytest.message(f"{PREFIX} pandalea")
    message = dpytest.get_message()