SharkyTheKing / Sharky

Sharky's Cogs. If you have any suggestions or issues, please feel free to add them here.
19 stars 9 forks source link

[MailSystem] Embeds or Messages #94

Open SharkyTheKing opened 3 years ago

SharkyTheKing commented 3 years ago

There is a command that lets servers decide if they want an embed or message to be sent to and from users.

I have yet to handle the full functionality, I have two small functions which handle these. One handles the message for staff, the other handle whether it is an embed or message., but I've not incorporated them yet into the commands yet. Another function needs to be added to handle the user's side if it'll be a message.

The two functions are:

    async def returning_content(self, ctx: commands.Context, contents: str, anonymous: bool):
        """
        A regular message that gets sent to either staff or user
        """
        if anonymous:
            return f"**Anonymous Staff: {contents}**"
        else:
            return f"**{ctx.author.name}: {contents}**"

    async def _return_embed_or_content(self, ctx) -> bool:
        context = await self.config.guild(ctx.guild).embed_embeds()
        return True if context else False