mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Safeguard against commands being used in dms
This commit is contained in:
@@ -342,9 +342,10 @@ async def on_message(message):
|
||||
if isinstance(message.channel, discord.DMChannel):
|
||||
channel = client.get_channel(1064888712565100614)
|
||||
await channel.send("Słyszałem ja żem że: " + message.content)
|
||||
return
|
||||
else:
|
||||
channel = message.channel
|
||||
await client.process_commands(message)
|
||||
await client.process_commands(message)
|
||||
|
||||
message.content = message.content.lower()
|
||||
|
||||
@@ -1077,8 +1078,10 @@ async def get_file(ctx, source, link):
|
||||
dir_path = None
|
||||
item_type, item_id = spotify.parse_spotify_url(link)
|
||||
if item_id:
|
||||
file_list = spotify.fetch_tracks(spotify_ctrl, item_type, link)
|
||||
directory_name = spotify.get_item_name(spotify_ctrl, item_type, item_id)
|
||||
coro = asyncio.to_thread(spotify.fetch_tracks, args=(spotify_ctrl, item_type, link))
|
||||
file_list = await coro
|
||||
coro = asyncio.to_thread(spotify.get_item_name, args=(spotify_ctrl, item_type, item_id))
|
||||
directory_name = await coro
|
||||
url_data = {"urls": []}
|
||||
url_dict = {}
|
||||
url_dict["save_path"] = Path(
|
||||
|
||||
Reference in New Issue
Block a user