mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 03:40:11 +01:00
refactor(codepreview): no dms
This commit is contained in:
2
TODO.md
2
TODO.md
@@ -65,6 +65,8 @@
|
|||||||
|
|
||||||
- [ ] Add logs to channel
|
- [ ] Add logs to channel
|
||||||
|
|
||||||
|
- [ ] make /codepreview into /github and it can parse any github url
|
||||||
|
|
||||||
- [ ] Add idevice livecontainer command
|
- [ ] Add idevice livecontainer command
|
||||||
|
|
||||||
- [x] add [tts](https://developer.puter.com/tutorials/free-unlimited-text-to-speech-api/) command
|
- [x] add [tts](https://developer.puter.com/tutorials/free-unlimited-text-to-speech-api/) command
|
||||||
|
|||||||
@@ -174,6 +174,15 @@ def codepreview_command():
|
|||||||
url="GitHub URL to preview code from"
|
url="GitHub URL to preview code from"
|
||||||
)
|
)
|
||||||
async def codepreview(self, context, url: str = None):
|
async def codepreview(self, context, url: str = None):
|
||||||
|
if not context.guild:
|
||||||
|
embed = discord.Embed(
|
||||||
|
title="Error",
|
||||||
|
description="Due to reasons ~~gatekeep~~, this command can only be used in servers. Please add this bot to your sever to use it, or use it in a server which has this bot added.",
|
||||||
|
color=0xE02B2B,
|
||||||
|
).set_author(name="Utility", icon_url="https://yes.nighty.works/raw/8VLDcg.webp")
|
||||||
|
await send_embed(context, embed, ephemeral=True)
|
||||||
|
return
|
||||||
|
|
||||||
if not url or not url.strip():
|
if not url or not url.strip():
|
||||||
if context.message and context.message.reference and context.message.reference.resolved:
|
if context.message and context.message.reference and context.message.reference.resolved:
|
||||||
replied_message = context.message.reference.resolved
|
replied_message = context.message.reference.resolved
|
||||||
|
|||||||
Reference in New Issue
Block a user