Skip to content

Commit a9e4aee

Browse files
committed
sort imports, fix docstrings more, format file
1 parent 9369709 commit a9e4aee

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

techsupport_bot/commands/echo.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
MessageEcho
55
66
This file contains 2 commands:
7-
.echo user
8-
.echo channel
7+
/echo user
8+
/echo channel
99
"""
1010

1111
from __future__ import annotations
@@ -14,9 +14,9 @@
1414

1515
import discord.abc
1616
from discord import app_commands
17+
from discord.ext import commands
1718

1819
from core import auxiliary, cogs
19-
from discord.ext import commands
2020

2121
if TYPE_CHECKING:
2222
import bot
@@ -59,7 +59,7 @@ async def echo_channel(
5959
6060
Args:
6161
interaction (discord.Interaction): the associated interaction
62-
channel (discord.Thread|discord.TextChannel|discord.VoiceChannel): the ID of the channel to send the echoed message
62+
channel (discord.Thread|discord.TextChannel|discord.VoiceChannel): channel to send the message to
6363
message (str): the message to echo
6464
"""
6565
try:
@@ -92,9 +92,8 @@ async def echo_user(
9292
"""
9393

9494
if user.bot:
95-
await interaction.response.send_message(
96-
embed=auxiliary.prepare_deny_embed(message="You cannot message a bot")
97-
)
95+
embed = auxiliary.prepare_deny_embed(message="You cannot message a bot")
96+
await interaction.response.send_message(embed=embed)
9897
return
9998

10099
try:

0 commit comments

Comments
 (0)