ToxicBot-Discord / ToxicBot

A discord bot capable of detecting toxic messages sent to a server, delete them and warn the author.
MIT License
12 stars 7 forks source link

Make use of Embeds in all bot responses #27

Closed zebralt closed 3 years ago

zebralt commented 3 years ago

Description

19

The module helper/embed.py provides helper functions to convert string messages into Embeds. In addition to the base case as_embed(text: str) -> Embed, this PR provides a few options to make messages more meaningful by styling the output Embed, not unlike log levels:

I used these to convert all (channel|ctx).send calls so that they send an Embed element to Discord instead of a raw string, as #19 was suggesting.

I used the helpful https://leovoel.github.io/embed-visualizer/ to make sure the Embeds looked right & test the functions in helper/embed.py.

Have you read the Contributing Guidelines on Pull Requests?

Type of change

Sid200026 commented 3 years ago

This is one impressive PR. Highly readable codes, proper comments. Appreciate this PR. Just one correction, you missed embedding one of the commands ( setdays ).

zebralt commented 3 years ago

Thanks for your kind words :) Here, I added the missing embed conversions.

Sid200026 commented 3 years ago

Thank you for your contribution. All the best.