NotParcel/commands.js

226 lines
4.8 KiB
JavaScript

// Command definitions
const Discord = require("discord.js")
module.exports = {
global: [
// Use SlashCommandBuilder for command creation
{
name: "give",
description: "Give a product to a user",
default_member_permissions: 0,
options: [
{
name: "product-name",
description: "The name of the product",
type: Discord.ApplicationCommandOptionType.String,
required: true
},
{
name: "roblox-id",
description: "The Roblox ID of the user",
type: Discord.ApplicationCommandOptionType.Number,
required: false
},
{
name: "discord-id",
description: "The Discord ID of the user",
type: Discord.ApplicationCommandOptionType.User,
required: false
}
]
},
{
name: "revoke",
description: "Revoke a product from a user",
default_member_permissions: 0,
options: [
{
name: "product-name",
description: "The name of the product",
type: Discord.ApplicationCommandOptionType.String,
required: true
},
{
name: "roblox-id",
description: "The Roblox ID of the user",
type: Discord.ApplicationCommandOptionType.Number,
required: false
},
{
name: "discord-id",
description: "The Discord ID of the user",
type: Discord.ApplicationCommandOptionType.User,
required: false
}
]
},
{
name: "link",
description: "Link your Roblox account",
options: [
{
name: "pairing-code",
description: "The pairing code given to you from the Roblox game",
type: Discord.ApplicationCommandOptionType.String,
required: true
}
]
},
{
name: "unlink",
description: "Unlink your Roblox account",
},
{
name: "products",
description: "List all products",
},
{
name: "profile",
description: "View a user's profile",
options: [
{
name: "roblox-id",
description: "The Roblox ID of the user",
type: Discord.ApplicationCommandOptionType.Number,
required: false
},
{
name: "discord-id",
description: "The Discord ID of the user",
type: Discord.ApplicationCommandOptionType.User,
required: false
}
]
},
{
name: "retrieve",
description: "Retrieve an owned product",
options: [
{
name: "product-name",
description: "The name of the product",
type: Discord.ApplicationCommandOptionType.String,
required: true
}
]
},
{
"name": "createproduct",
"description": "Create a product",
"default_member_permissions": 0,
"options": [
{
"name": "name",
"description": "The name of the product",
"type": 3,
"required": true
}
]
},
{
name: "deleteproduct",
description: "Delete a product",
default_member_permissions: 0,
options: [
{
name: "name",
description: "The name of the product",
type: Discord.ApplicationCommandOptionType.String,
required: true
}
]
},
{
name: "update",
description: "Update a product",
default_member_permissions: 0,
options: [
{
name: "name",
description: "The name of the product",
type: Discord.ApplicationCommandOptionType.String,
required: true
},
{
name: "field",
description: "The field to update",
type: Discord.ApplicationCommandOptionType.String,
required: true,
choices: [
{
name: "Name",
value: "name"
},
{
name: "Description",
value: "description"
},
{
name: "Dev Product ID",
value: "devProductId"
},
{
name: "Image ID",
value: "imageId"
},
{
name: "File",
value: "file"
},
{
name: "Stocking Info",
value: "stock"
},
{
name: "Category",
value: "category"
}
]
}
]
},
{
name: "forcelink",
description: "Force link a Roblox account to a Discord user",
default_member_permissions: 0,
options: [
{
name: "roblox-id",
description: "The Roblox ID of the user",
type: Discord.ApplicationCommandOptionType.Number,
required: true
},
{
name: "discord-id",
description: "The Discord ID of the user",
type: Discord.ApplicationCommandOptionType.User,
required: true
}
]
},
{
name: "forceunlink",
description: "Force unlink a Roblox account from a Discord user",
default_member_permissions: 0,
options: [
{
name: "roblox-id",
description: "The Roblox ID of the user",
type: Discord.ApplicationCommandOptionType.Number,
required: false
},
{
name: "discord-id",
description: "The Discord ID of the user",
type: Discord.ApplicationCommandOptionType.User,
required: false
}
]
},
{
name: "hub",
description: "Get the hub URL.",
}
],
admin: []
}