| 603 | } |
| 604 | |
| 605 | std::vector<std::string> tokenize(std::string const &in, const char* sep) { |
| 606 | std::string::size_type b = 0; |
| 607 | std::vector<std::string> result; |
| 608 | |
| 609 | while ((b = in.find_first_not_of(sep, b)) != std::string::npos) { |
| 610 | auto e = in.find(sep, b); |
| 611 | result.push_back(in.substr(b, e-b)); |
| 612 | b = e; |
| 613 | } |
| 614 | return result; |
| 615 | } |
| 616 | |
| 617 | std::string bot_invite_url(const snowflake bot_id, const uint64_t permissions, const std::vector<std::string>& scopes) { |
| 618 | std::string scope; |