Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 32fbd2f

Browse files
committed
Add check cmd, tweak allowed mentions to None
1 parent a0db5aa commit 32fbd2f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

_orangcbot/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ async def on_command_error(
4949
help_command=help_commands.PaginatedHelpCommand(),
5050
case_insensitive=True,
5151
owner_id=716134528409665586,
52+
allowed_mentions=nextcord.AllowedMentions.none(),
5253
)
5354
# @bot.event
5455
# async def on_command_error(ctx, error):

_orangcbot/extensions/nonsense.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,22 @@ async def whois(
259259
)
260260
await ctx.send(embed=embed, view=k)
261261

262+
@commands.command()
263+
async def check(
264+
self, ctx: commands.Context, domain: SubdomainNameConverter
265+
) -> None:
266+
try:
267+
data = await request(
268+
True,
269+
"GET",
270+
f"https://raw.githubusercontent.com/is-a-dev/register/main/domains/{domain}.json",
271+
)
272+
await ctx.send(f"Domain {domain} is already taken.")
273+
except DomainNotExistError:
274+
await ctx.send(
275+
"This domain is still available. Claim it before someone take it."
276+
)
277+
262278

263279
def setup(bot: commands.Bot):
264280
bot.add_cog(Nonsense(bot))

0 commit comments

Comments
 (0)