Modernize syntax in chat formatting module and add success() #5427

Merged
madebylydia merged 35 commits from chat-formatting-enhancement into V3/develop 2021-10-27 14:34:20 +02:00
madebylydia commented 2021-10-26 21:37:36 +02:00 (Migrated from github.com)

Description of the changes

As discussed in advanced-coding, this PR is made to add a success function to the others utils that add an emoji to a text (error, warning, info, etc...), which was missing to me.

In the same time, I have changed all functions using .format so they can use f-string, as the processing time is faster.

image
Credits to Zephyrkul#1089 for running tests.

For some reasons this PR is a ton of bullshitting commits coming out of nowhere so don't pay attention, I guess, and be sure to squash commit this one :v

### Description of the changes [As discussed in advanced-coding](https://ptb.discord.com/channels/133049272517001216/718148684629540905/902620754112315474), this PR is made to add a `success` function to the others utils that add an emoji to a text (`error`, `warning`, `info`, etc...), which was missing to me. In the same time, I have changed all functions using `.format` so they can use f-string, as the processing time is faster. ![image](https://user-images.githubusercontent.com/61093863/138948732-c9d131a6-fcd0-43ae-8b07-d56dd113504e.png) Credits to Zephyrkul#1089 for running tests. For some reasons this PR is a ton of bullshitting commits coming out of nowhere so don't pay attention, I guess, and be sure to squash commit this one :v
Dav-Git (Migrated from github.com) approved these changes 2021-10-26 23:12:16 +02:00
Dav-Git (Migrated from github.com) left a comment

This is nice

This is nice
Jackenmen (Migrated from github.com) approved these changes 2021-10-27 14:33:36 +02:00
Jackenmen (Migrated from github.com) left a comment

LGTM

LGTM
red-githubbot[bot] commented 2021-10-27 14:34:23 +02:00 (Migrated from github.com)

Thanks Predeactor for the PR 🎉. I'm working now to backport this PR to: 3.4.

Thanks Predeactor for the PR 🎉. I'm working now to backport this PR to: 3.4.
red-githubbot[bot] commented 2021-10-27 14:34:34 +02:00 (Migrated from github.com)

#5428 is a backport of this pull request to Red 3.4.

#5428 is a backport of this pull request to [Red 3.4](https://github.com/Cog-Creators/Red-DiscordBot/tree/3.4).
madebylydia commented 2021-10-27 15:24:12 +02:00 (Migrated from github.com)

thank you jack

![thank you jack](https://user-images.githubusercontent.com/61093863/139074377-f9ef7aea-f45d-4c51-b0d5-072e4db7a278.gif)
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!5427
No description provided.