@@ -12,10 +12,10 @@ std::list<cmdStruct> cmdList = {
1212 { " topic" , " Get a topic question" , cmd::topicCommand },
1313 { " coding" , " Get a coding question" , cmd::codingCommand },
1414 { " close" , " Close a ticket or forum post" , cmd::closeCommand },
15- { " ticket" , " Open a ticket" , cmd::ticketCommand },
15+ { " ticket" , " Open a ticket" , cmd::ticketCommand, { dpp::command_option (dpp::command_option_type::co_user, " participant " , " Add participant " , false ) } },
1616 { " code" , " Formatting code on Discord" , cmd::codeCommand },
1717 { " project" , " Get a project idea" , cmd::projectCommand },
18- { " rule" , " Get the server rules" , cmd::ruleCommand, { dpp::command_option (dpp::command_option_type::co_integer, " number" , " Rule to mention" , false ) } }
18+ { " rule" , " Get the server rules" , cmd::ruleCommand, { dpp::command_option (dpp::command_option_type::co_integer, " number" , " Rule to mention" , false ) }}
1919};
2020
2121int main ()
@@ -40,9 +40,11 @@ int main()
4040 slashCommand.set_application_id (bot.me .id );
4141
4242 for (const dpp::command_option& arg : item.args )
43- {
4443 slashCommand.add_option (arg);
45- }
44+
45+ if (item.permissions )
46+ slashCommand.set_default_permissions (dpp::permission (item.permissions ));
47+
4648 slashcommands.push_back (slashCommand);
4749 }
4850 bot.global_bulk_command_create (slashcommands);
0 commit comments