-
Notifications
You must be signed in to change notification settings - Fork 0
V. Commands
These are commands that must be actively called by a user to take effect. Along with the command call itself (i.e. !command), they often require, or optionally allow, several other parameters to be given. Parameters are positional by Discord's restrictions, meaning the orders and amount will always matter.
- Everything is cASe-SenSiTIve.
- Position matters.
- Channel matters.
- Your roles matter.
- Good Practice: Put all your parameters inside quotes like "this".
@bot.command(name='interview',
brief=" = Begins an interview with whichever "Guest" calls it.",
description="Begins an interview with whoever calls it. After completion and submission of the interview, it will create an entry in the long-term JSON file.")
@commands.has_role('Guest')
@commands.cooldown(1, 1800, commands.BucketType.user)
async def dm(ctx):This function has no parameters, and can only be called on its own with no modifiers. It has a few requirements:
- You must have the "Guest" role to call it
- You must be in the specified channel, in this case:
#request-orientation
It starts a DM with the user who called it, then works in tandem with the event handler, on_raw_reaction_add, to identify the user's choices and submit them into the designated orientation logging channel. Simultaneously, upon submission by the user, it will add them into the long-term JSON file logs. After that it will simply wait for approval or denial of the log before moving on, making changes to the user's roles and nickname, and finalizing their admission/denial to/from the org.
@bot.command(name='create',
brief=" = Manually creates a log entry for a given user and log message.",
description="Manually creates a log entry for a given user and log message. REQUIRES A MINIMUM OF MESSAGE_ID AND USER_ID. All other parameters are optional but must be given in order if you desire to use them. Otherwise use the command !update after creating the log.\n\nmessage_id = (INTEGER) The ID of the message in Orientation Log Channel for the user's interview.\nuser_id = (INTEGER) The Discord User ID of the member.\ndiscord_username = (STRING) The Discord username of the member.\nrsi_username = (STRING) The RSI username of the member.\nnotes = (STRING) Anything you may want noted within the log.\nadmitted = (BOOLEAN) Whether or not the user has been admitted. True=admitted, False=denied, Null=pending.\nred_flag = (BOOLEAN) Will notify Command if a user joins that can be found in logs with this flag. True=notify, False=default.\nred_flag_msg = (STRING) Whatever message you may want displayed when a flagged user joins.")
@commands.has_role(ORIENTATION_ROLE_NAME)
async def create(ctx, message_id:int, user_id:int, discord_username="", rsi_username="", notes="", admitted:bool=None, red_flag:bool=False, red_flag_msg=""):@bot.command(name="update",
brief=" = Will update a log, given an ID and the item you want updated.",
description="Update a log, given an ID and the item you want updated. The key and value pair provided will be what is updated, and what it is updated to.\n\nFor reference, 'KEY':'VALUE' is how it appears in the logs while using the !find command.")
@commands.has_role(ORIENTATION_ROLE_NAME)
async def update(ctx, search_ID, key, value):@bot.command(name='find',
brief=" = Find a log by giving it an ID or name.",
description="Will find a log by giving it log's message ID, the user's discord ID, an RSI username, or a Discord username. It will search numerical queries through messageID and discordID first. It is recommended to not rely on using the Discord username, as it can easily be changed.")
@commands.has_role(ORIENTATION_ROLE_NAME)
async def find(ctx, query):| Home
| INVFED Website
| INVFED RSI Page
| INVFED Discord Server
| Turtle-12 GitHub
| Please report issues on the issues page.
|
This is an unofficial Star Citizen tool, not affiliated with the Cloud Imperium group of companies. All content on this site not authored by its host or users are property of their respective owners. This project is not endorsed by or affiliated with the Cloud Imperium or Roberts Space Industries group of companies. All game content and materials are copyright Cloud Imperium Rights LLC, Cloud Imperium Rights Ltd, Star Citizen®, Squadron 42®, Roberts Space Industries®, and Cloud Imperium® are registered trademarks of Cloud Imperium Rights LLC. All rights reserved.