Merge branch 'main' into 'dev'
Add hotpatches See merge request stark-industries/jarvis/jarvis-bot!70
This commit is contained in:
commit
f53fae1dcf
6 changed files with 9 additions and 5 deletions
|
@ -20,7 +20,7 @@ from naff.models.naff.cooldowns import Buckets
|
||||||
|
|
||||||
from jarvis.utils import build_embed
|
from jarvis.utils import build_embed
|
||||||
|
|
||||||
guild_ids = [862402786116763668] # [578757004059738142, 520021794380447745, 862402786116763668]
|
guild_ids = [578757004059738142, 520021794380447745, 862402786116763668]
|
||||||
|
|
||||||
valid = re.compile(r"[\w\s\-\\/.!@#$%^*()+=<>,\u0080-\U000E0FFF]*")
|
valid = re.compile(r"[\w\s\-\\/.!@#$%^*()+=<>,\u0080-\U000E0FFF]*")
|
||||||
invites = re.compile(
|
invites = re.compile(
|
||||||
|
|
|
@ -18,7 +18,7 @@ from jarvis.config import JarvisConfig
|
||||||
from jarvis.data.dbrand import shipping_lookup
|
from jarvis.data.dbrand import shipping_lookup
|
||||||
from jarvis.utils import build_embed
|
from jarvis.utils import build_embed
|
||||||
|
|
||||||
guild_ids = [862402786116763668] # [578757004059738142, 520021794380447745, 862402786116763668]
|
guild_ids = [578757004059738142, 520021794380447745, 862402786116763668]
|
||||||
|
|
||||||
|
|
||||||
class DbrandCog(Extension):
|
class DbrandCog(Extension):
|
||||||
|
|
|
@ -275,6 +275,7 @@ class DevCog(Extension):
|
||||||
@slash_command(name="cloc", description="Get JARVIS lines of code")
|
@slash_command(name="cloc", description="Get JARVIS lines of code")
|
||||||
@cooldown(bucket=Buckets.CHANNEL, rate=1, interval=30)
|
@cooldown(bucket=Buckets.CHANNEL, rate=1, interval=30)
|
||||||
async def _cloc(self, ctx: InteractionContext) -> None:
|
async def _cloc(self, ctx: InteractionContext) -> None:
|
||||||
|
await ctx.defer()
|
||||||
output = subprocess.check_output( # noqa: S603, S607
|
output = subprocess.check_output( # noqa: S603, S607
|
||||||
["tokei", "-C", "--sort", "code"]
|
["tokei", "-C", "--sort", "code"]
|
||||||
).decode("UTF-8")
|
).decode("UTF-8")
|
||||||
|
|
|
@ -83,7 +83,7 @@ class UtilCog(Extension):
|
||||||
|
|
||||||
@slash_command(name="rchk", description="Robot Camo HK416")
|
@slash_command(name="rchk", description="Robot Camo HK416")
|
||||||
async def _rchk(self, ctx: InteractionContext) -> None:
|
async def _rchk(self, ctx: InteractionContext) -> None:
|
||||||
await ctx.send(content=hk)
|
await ctx.send(content=hk, ephemeral=True)
|
||||||
|
|
||||||
@slash_command(
|
@slash_command(
|
||||||
name="rcauto",
|
name="rcauto",
|
||||||
|
@ -111,7 +111,7 @@ class UtilCog(Extension):
|
||||||
elif len(to_send) == 0:
|
elif len(to_send) == 0:
|
||||||
await ctx.send("No valid text found", ephemeral=True)
|
await ctx.send("No valid text found", ephemeral=True)
|
||||||
else:
|
else:
|
||||||
await ctx.send(to_send)
|
await ctx.send(to_send, ephemeral=True)
|
||||||
|
|
||||||
@slash_command(name="avatar", description="Get a user avatar")
|
@slash_command(name="avatar", description="Get a user avatar")
|
||||||
@slash_option(
|
@slash_option(
|
||||||
|
|
|
@ -40,7 +40,6 @@ class VerifyCog(Extension):
|
||||||
@slash_command(name="verify", description="Verify that you've read the rules")
|
@slash_command(name="verify", description="Verify that you've read the rules")
|
||||||
@cooldown(bucket=Buckets.USER, rate=1, interval=30)
|
@cooldown(bucket=Buckets.USER, rate=1, interval=30)
|
||||||
async def _verify(self, ctx: InteractionContext) -> None:
|
async def _verify(self, ctx: InteractionContext) -> None:
|
||||||
await ctx.defer()
|
|
||||||
role = await Setting.find_one(q(guild=ctx.guild.id, setting="verified"))
|
role = await Setting.find_one(q(guild=ctx.guild.id, setting="verified"))
|
||||||
if not role:
|
if not role:
|
||||||
message = await ctx.send("This guild has not enabled verification", ephemeral=True)
|
message = await ctx.send("This guild has not enabled verification", ephemeral=True)
|
||||||
|
|
4
run.py
4
run.py
|
@ -1,4 +1,8 @@
|
||||||
"""Main run file for J.A.R.V.I.S."""
|
"""Main run file for J.A.R.V.I.S."""
|
||||||
|
import nest_asyncio
|
||||||
|
|
||||||
|
nest_asyncio.apply()
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
import nest_asyncio
|
import nest_asyncio
|
||||||
|
|
Loading…
Add table
Reference in a new issue