<filename>revolt/plugins/commands/context.py<gh_stars>0
from revolt.types.file import File
from revolt.embed import Embed
from revolt.message import Message
from typing import Optional


class Context:
    def __init__(self, message, bot):
        self.message = message
        self.bot = bot

    async def send(self, content: Optional[str] = None, embeds: Optional[list[Embed]] = None, embed: Optional[Embed] = None, attachments: Optional[list[File]] = None) -> Message:
        """Sends a message in a channel, you must send at least one of either `content`, `embeds` or `attachments`

        Parameters
        -----------
        content: Optional[:class:`str`]
            The content of the message, this will not include system message's content
        attachments: Optional[list[:class:`File`]]
            The attachments of the message
        embeds: Optional[list[:class:`Embed`]]
            The embeds of the message

        Returns
        --------
        :class:`Message`
            The message that was just sent
        """
        return await self.message.channel.send(content, embeds, embed, attachments)
<filename>revolt/plugins/commands/context.py<gh_stars>0
from revolt.types.file import File
from revolt.embed import Embed
from revolt.message import Message
from typing import Optional


class Context:
    def __init__(self, message, bot):
        self.message = message
        self.bot = bot

    async def send(self, content: Optional[str] = None, embeds: Optional[list[Embed]] = None, embed: Optional[Embed] = None, attachments: Optional[list[File]] = None) -> Message:
        """Sends a message in a channel, you must send at least one of either `content`, `embeds` or `attachments`

        Parameters
        -----------
        content: Optional[:class:`str`]
            The content of the message, this will not include system message's content
        attachments: Optional[list[:class:`File`]]
            The attachments of the message
        embeds: Optional[list[:class:`Embed`]]
            The embeds of the message

        Returns
        --------
        :class:`Message`
            The message that was just sent
        """
        return await self.message.channel.send(content, embeds, embed, attachments)
Sends a message in a channel, you must send at least one of either `content`, `embeds` or `attachments`          Parameters         -----------         content: Optional[:class:`str`]             The content of the message, this will not include system message's content         attachments: Optional[list[:class:`File`]]             The attachments of the message         embeds: Optional[list[:class:`Embed`]]             The embeds of the message          Returns         --------         :class:`Message`             The message that was just sent