misc(nerdify): use redbot chat_formatting for errors
This commit is contained in:
parent
539052eb00
commit
1f4254e9ca
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ from typing import Any, Optional
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
from redbot.core.utils import common_filters
|
from redbot.core.utils import chat_formatting, common_filters
|
||||||
|
|
||||||
|
|
||||||
class Nerdify(commands.Cog):
|
class Nerdify(commands.Cog):
|
||||||
|
@ -33,7 +33,7 @@ class Nerdify(commands.Cog):
|
||||||
if not text:
|
if not text:
|
||||||
messages = [message async for message in ctx.channel.history(limit=2)]
|
messages = [message async for message in ctx.channel.history(limit=2)]
|
||||||
# [0] is the command, [1] is the message before the command
|
# [0] is the command, [1] is the message before the command
|
||||||
text = messages[1].content or "I can't translate that!"
|
text = messages[1].content or chat_formatting.error("I can't translate that!")
|
||||||
await self.type_message(
|
await self.type_message(
|
||||||
ctx.channel,
|
ctx.channel,
|
||||||
self.nerdify_text(text),
|
self.nerdify_text(text),
|
||||||
|
|
Loading…
Reference in a new issue