Skip to main content
Version: 3.x


Utility functions are used to complement the communication between corde and Discord, it provides just a few functions to iterate tests with Discord using corde's bot or your self bot.

sendMessage(string | number | MessageEmbed)

Use sendMessage to send a message as corde bot. This is useful if you do not want to depend directly on expect to wait for corde to send a message.

const message = await corde.sendMessage("Hi Frodo!");


Creates a new role to the guild provided in configs.

const role = await corde.createRole({
name: "role Banana",


Finds a role in config guild's cache, basing on its id or name.

const role = corde.getRole("123124");
const role = corde.getRole({ id: "1231241" });
const role = corde.getRole({ name: "role Banana" });