Restrict dbrand and ctc2 commands to Stark Industry and dbrand servers

This commit is contained in:
Zeva Rose 2021-07-16 18:13:09 -06:00
parent cb9b4272ed
commit af3d6a7edb
2 changed files with 19 additions and 14 deletions

View file

@ -6,6 +6,8 @@ import jarvis
from jarvis.config import get_config
from jarvis.utils.db import DBManager
guild_ids = [578757004059738142, 520021794380447745, 862402786116763668]
class CTCCog(commands.Cog):
def __init__(self, bot):
@ -19,7 +21,7 @@ class CTCCog(commands.Cog):
base="ctc2",
name="about",
description="CTC2 related commands",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
)
async def _about(self, ctx):
await ctx.send("See https://completethecode.com for more information")
@ -28,7 +30,7 @@ class CTCCog(commands.Cog):
base="ctc2",
name="pw",
description="Guess a password for https://completethecodetwo.cards",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
)
async def _pw(self, ctx, guess: str):
guessed = self.db.ctc2.guesses.find_one({"guess": guess})

View file

@ -1,15 +1,18 @@
import re
import aiohttp
import jarvis
from discord.ext import commands
from discord_slash import cog_ext
from discord_slash.utils.manage_commands import create_option
import jarvis
from jarvis.config import get_config
from jarvis.data.dbrand import shipping_lookup
from jarvis.utils import build_embed
from jarvis.utils.field import Field
guild_ids = [578757004059738142, 520021794380447745, 862402786116763668]
class DbrandCog(commands.Cog):
"""
@ -29,7 +32,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="skin",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="See what skins are available",
)
async def _skin(self, ctx):
@ -38,7 +41,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="robotcamo",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="Get some robot camo. Make Tony Stark proud",
)
async def _camo(self, ctx):
@ -47,7 +50,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="grip",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="See devices with Grip support",
)
async def _grip(self, ctx):
@ -56,7 +59,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="contact",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="Contact support",
)
async def _contact(self, ctx):
@ -67,7 +70,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="support",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="Contact support",
)
async def _support(self, ctx):
@ -78,7 +81,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="orderstat",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="Get your order status",
)
async def _orderstat(self, ctx):
@ -87,7 +90,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="orders",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="Get your order status",
)
async def _orders(self, ctx):
@ -96,7 +99,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="status",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="dbrand status",
)
async def _status(self, ctx):
@ -105,7 +108,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="buy",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="Give us your money!",
)
async def _buy(self, ctx):
@ -114,7 +117,7 @@ class DbrandCog(commands.Cog):
@cog_ext.cog_subcommand(
base="db",
name="extortion",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
description="(not) extortion",
)
async def _extort(self, ctx):
@ -126,7 +129,7 @@ class DbrandCog(commands.Cog):
base="db",
name="ship",
description="Get shipping information for your country",
guild_ids=[862402786116763668, 578757004059738142],
guild_ids=guild_ids,
options=[
(
create_option(