|
@@ -1,14 +1,19 @@
|
|
|
+import environment_vars
|
|
|
import discord
|
|
|
from os import environ
|
|
|
-import environment_vars
|
|
|
-from decorators import author_is_not_bot, notify_if_wrong_command
|
|
|
from img_urls import good_face_url
|
|
|
+from decorators import (
|
|
|
+ author_is_not_bot,
|
|
|
+ notify_if_wrong_command
|
|
|
+)
|
|
|
from utils import (
|
|
|
on_ready_print,
|
|
|
receive_message_then_send,
|
|
|
get_commands_from_file,
|
|
|
message_is_song_name,
|
|
|
- get_video_url_by_song_name
|
|
|
+ get_video_url_by_song_name,
|
|
|
+ get_image,
|
|
|
+ get_commands_list_to_send
|
|
|
)
|
|
|
|
|
|
|
|
@@ -27,7 +32,7 @@ class MyClient(discord.Client):
|
|
|
return
|
|
|
|
|
|
if await receive_message_then_send(message, "!help"):
|
|
|
- await message.channel.send("Available commands: \n" + self._help_commands_for_output)
|
|
|
+ await message.channel.send(get_commands_list_to_send(self))
|
|
|
return
|
|
|
|
|
|
if message.attachments:
|
|
@@ -36,7 +41,7 @@ class MyClient(discord.Client):
|
|
|
return
|
|
|
|
|
|
if await receive_message_then_send(message, "face"):
|
|
|
- image_to_send = discord.Embed().set_image(url=good_face_url)
|
|
|
+ image_to_send = get_image(url=good_face_url)
|
|
|
await message.channel.send(embed=image_to_send)
|
|
|
return
|
|
|
|