Restrict dbrand and ctc2 commands to Stark Industry and dbrand servers
This commit is contained in:
parent
cb9b4272ed
commit
af3d6a7edb
2 changed files with 19 additions and 14 deletions
|
@ -6,6 +6,8 @@ import jarvis
|
||||||
from jarvis.config import get_config
|
from jarvis.config import get_config
|
||||||
from jarvis.utils.db import DBManager
|
from jarvis.utils.db import DBManager
|
||||||
|
|
||||||
|
guild_ids = [578757004059738142, 520021794380447745, 862402786116763668]
|
||||||
|
|
||||||
|
|
||||||
class CTCCog(commands.Cog):
|
class CTCCog(commands.Cog):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
@ -19,7 +21,7 @@ class CTCCog(commands.Cog):
|
||||||
base="ctc2",
|
base="ctc2",
|
||||||
name="about",
|
name="about",
|
||||||
description="CTC2 related commands",
|
description="CTC2 related commands",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
)
|
)
|
||||||
async def _about(self, ctx):
|
async def _about(self, ctx):
|
||||||
await ctx.send("See https://completethecode.com for more information")
|
await ctx.send("See https://completethecode.com for more information")
|
||||||
|
@ -28,7 +30,7 @@ class CTCCog(commands.Cog):
|
||||||
base="ctc2",
|
base="ctc2",
|
||||||
name="pw",
|
name="pw",
|
||||||
description="Guess a password for https://completethecodetwo.cards",
|
description="Guess a password for https://completethecodetwo.cards",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
)
|
)
|
||||||
async def _pw(self, ctx, guess: str):
|
async def _pw(self, ctx, guess: str):
|
||||||
guessed = self.db.ctc2.guesses.find_one({"guess": guess})
|
guessed = self.db.ctc2.guesses.find_one({"guess": guess})
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import jarvis
|
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from discord_slash import cog_ext
|
from discord_slash import cog_ext
|
||||||
from discord_slash.utils.manage_commands import create_option
|
from discord_slash.utils.manage_commands import create_option
|
||||||
|
|
||||||
|
import jarvis
|
||||||
from jarvis.config import get_config
|
from jarvis.config import get_config
|
||||||
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
|
||||||
from jarvis.utils.field import Field
|
from jarvis.utils.field import Field
|
||||||
|
|
||||||
|
guild_ids = [578757004059738142, 520021794380447745, 862402786116763668]
|
||||||
|
|
||||||
|
|
||||||
class DbrandCog(commands.Cog):
|
class DbrandCog(commands.Cog):
|
||||||
"""
|
"""
|
||||||
|
@ -29,7 +32,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="skin",
|
name="skin",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="See what skins are available",
|
description="See what skins are available",
|
||||||
)
|
)
|
||||||
async def _skin(self, ctx):
|
async def _skin(self, ctx):
|
||||||
|
@ -38,7 +41,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="robotcamo",
|
name="robotcamo",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="Get some robot camo. Make Tony Stark proud",
|
description="Get some robot camo. Make Tony Stark proud",
|
||||||
)
|
)
|
||||||
async def _camo(self, ctx):
|
async def _camo(self, ctx):
|
||||||
|
@ -47,7 +50,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="grip",
|
name="grip",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="See devices with Grip support",
|
description="See devices with Grip support",
|
||||||
)
|
)
|
||||||
async def _grip(self, ctx):
|
async def _grip(self, ctx):
|
||||||
|
@ -56,7 +59,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="contact",
|
name="contact",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="Contact support",
|
description="Contact support",
|
||||||
)
|
)
|
||||||
async def _contact(self, ctx):
|
async def _contact(self, ctx):
|
||||||
|
@ -67,7 +70,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="support",
|
name="support",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="Contact support",
|
description="Contact support",
|
||||||
)
|
)
|
||||||
async def _support(self, ctx):
|
async def _support(self, ctx):
|
||||||
|
@ -78,7 +81,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="orderstat",
|
name="orderstat",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="Get your order status",
|
description="Get your order status",
|
||||||
)
|
)
|
||||||
async def _orderstat(self, ctx):
|
async def _orderstat(self, ctx):
|
||||||
|
@ -87,7 +90,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="orders",
|
name="orders",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="Get your order status",
|
description="Get your order status",
|
||||||
)
|
)
|
||||||
async def _orders(self, ctx):
|
async def _orders(self, ctx):
|
||||||
|
@ -96,7 +99,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="status",
|
name="status",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="dbrand status",
|
description="dbrand status",
|
||||||
)
|
)
|
||||||
async def _status(self, ctx):
|
async def _status(self, ctx):
|
||||||
|
@ -105,7 +108,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="buy",
|
name="buy",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="Give us your money!",
|
description="Give us your money!",
|
||||||
)
|
)
|
||||||
async def _buy(self, ctx):
|
async def _buy(self, ctx):
|
||||||
|
@ -114,7 +117,7 @@ class DbrandCog(commands.Cog):
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="db",
|
base="db",
|
||||||
name="extortion",
|
name="extortion",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
description="(not) extortion",
|
description="(not) extortion",
|
||||||
)
|
)
|
||||||
async def _extort(self, ctx):
|
async def _extort(self, ctx):
|
||||||
|
@ -126,7 +129,7 @@ class DbrandCog(commands.Cog):
|
||||||
base="db",
|
base="db",
|
||||||
name="ship",
|
name="ship",
|
||||||
description="Get shipping information for your country",
|
description="Get shipping information for your country",
|
||||||
guild_ids=[862402786116763668, 578757004059738142],
|
guild_ids=guild_ids,
|
||||||
options=[
|
options=[
|
||||||
(
|
(
|
||||||
create_option(
|
create_option(
|
||||||
|
|
Loading…
Add table
Reference in a new issue