Skip to content

Commit 93d3de9

Browse files
committed
DiscordCoreAPI Release v2.0.2
* Modified the connection behavior of the VoiceConnection class. * Added support for the Discord "custom bot status"es. * Modified the getCached(x) functions to retrieve from the HTTPS endpoints when the object is absent from the cache. * Replaced all of std::string with jsonifier::string, std::string_view with jsonifier::string_view. * Added a ToEntity interface for collecting data-structures from their Snowflake ids. * Modified the CMakeLists.txt files. * Also modified calls to stoull et al. * Removed a bunch of superfluous concepts. * Refactored the KeyHasher and KeyAccessor classes. * Modified the VoiceConnection class to better avoid unnecessary calls to getUserAsync. * Switched from using strings to using string_views in the Https client classes. * Fixed an issue with a moved-from object. * Updated the caching behaviors of the EventManager class.
1 parent f0e3624 commit 93d3de9

File tree

543 files changed

+27830
-24677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

543 files changed

+27830
-24677
lines changed

.github/workflows/MSVC_2022-Windows.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
git stash
2828
git pull
2929
vcpkg update
30-
30+
3131
- name: Install the dependencies.
3232
run: |
3333
vcpkg install opus:x64-windows
@@ -44,9 +44,13 @@ jobs:
4444
run: |
4545
cmake --build . --config=${{matrix.build_type}}
4646
47+
- name: Install the Test
48+
working-directory: ./Build/Tests
49+
run: |
50+
cmake --install ./ --config=${{matrix.build_type}}
51+
4752
- name: Run the Test
48-
working-directory: ./Install/${{matrix.build_type}}
53+
working-directory: ./Tests/Install/${{matrix.build_type}}
4954
run: |
5055
./DiscordCoreAPITest.exe
51-
continue-on-error: true
52-
56+
continue-on-error: true

BuildTools/Vendor/Composer/ClassLoader.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function getClassMap()
158158

159159
/**
160160
* @param string[] $classMap Class to filename map
161-
* @psalm-param array<string, string> $classMap
161+
* @psalm-param Array<string, string> $classMap
162162
*
163163
* @return void
164164
*/
@@ -177,7 +177,7 @@ public function addClassMap(array $classMap)
177177
*
178178
* @param string $prefix The prefix
179179
* @param string[]|string $paths The PSR-0 root directories
180-
* @param bool $prepend Whether to prepend the directories
180+
* @param Bool $prepend Whether to prepend the directories
181181
*
182182
* @return void
183183
*/
@@ -224,7 +224,7 @@ public function add($prefix, $paths, $prepend = false)
224224
*
225225
* @param string $prefix The prefix/namespace, with trailing '\\'
226226
* @param string[]|string $paths The PSR-4 base directories
227-
* @param bool $prepend Whether to prepend the directories
227+
* @param Bool $prepend Whether to prepend the directories
228228
*
229229
* @throws \InvalidArgumentException
230230
*
@@ -314,7 +314,7 @@ public function setPsr4($prefix, $paths)
314314
/**
315315
* Turns on searching the include path for class files.
316316
*
317-
* @param bool $useIncludePath
317+
* @param Bool $useIncludePath
318318
*
319319
* @return void
320320
*/
@@ -338,7 +338,7 @@ public function getUseIncludePath()
338338
* Turns off searching the prefix and fallback directories for classes
339339
* that have not been registered with the class map.
340340
*
341-
* @param bool $classMapAuthoritative
341+
* @param Bool $classMapAuthoritative
342342
*
343343
* @return void
344344
*/
@@ -382,7 +382,7 @@ public function getApcuPrefix()
382382
/**
383383
* Registers this instance as an autoloader.
384384
*
385-
* @param bool $prepend Whether to prepend the autoloader or not
385+
* @param Bool $prepend Whether to prepend the autoloader or not
386386
*
387387
* @return void
388388
*/

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,8 @@ if (EXISTS "$ENV{VCPKG_INSTALLATION_ROOT}")
5656
set(unofficial-sodium_DIR "${VCPKG_INSTALLATION_ROOT_NEW}/installed/x64-${OS}/share/unofficial-sodium")
5757
endif()
5858
include("${VCPKG_INSTALLATION_ROOT_NEW}/scripts/buildsystems/vcpkg.cmake")
59-
set(OS_NAME "${CMAKE_SYSTEM_NAME}")
60-
string(TOLOWER "${OS_NAME}" OS_NAME)
61-
set(DEBUG_PREFIX "")
6259
else()
6360
message(WARNING "No Vcpkg root folder found, Please make sure that you properly set the library folders.")
64-
set(VCPKG_INSTALLATION_ROOT_NEW "${VCPKG_ROOT_DIR}")
6561
endif()
6662

6763
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/CMake;")

Documentation/Doxygen/Custom/doxygen-awesome-darkmode-toggle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ class DoxygenAwesomeDarkModeToggle extends HTMLElement {
8787
}
8888

8989
/**
90-
* @returns `true` for dark-mode, `false` for light-mode system preference
90+
* @return `true` for dark-mode, `false` for light-mode system preference
9191
*/
9292
static get systemPreference() {
9393
return window.matchMedia('(prefers-color-scheme: light)').matches
9494
}
9595

9696
/**
97-
* @returns `true` for dark-mode, `false` for light-mode user preference
97+
* @return `true` for dark-mode, `false` for light-mode user preference
9898
*/
9999
static get userPreference() {
100100
return (!DoxygenAwesomeDarkModeToggle.systemPreference && localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)) ||

Documentation/Doxygen/Custom/header.html

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,60 @@
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
33
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
44
<head>
5-
<meta name="description" content="DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines." />
6-
<meta name="keywords" content="Discord Bot API, Discord API, Discord Bot, Discord Bot C++, C++ CoRoutines, Fast Discord Bot Library, Discord, Bot, Library, DiscordAPI" />
7-
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
8-
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
9-
<meta name="generator" content="Doxygen $doxygenversion"/>
10-
<meta name="viewport" content="width=device-width, initial-scale=1"/>
5+
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta charset="utf-8">
8+
<!--BEGIN PROJECT_NAME-->
9+
<title>$title - DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines.</title><!--END PROJECT_NAME-->
10+
<!--BEGIN !PROJECT_NAME-->
11+
<title>$title - DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines.</title><!--END !PROJECT_NAME-->
12+
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css" />
13+
<script type="text/javascript" src="$relpath^jquery.js"></script>
14+
<script type="text/javascript" src="$relpath^dynsections.js"></script>
15+
<meta name="description" content="DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines." />
16+
<meta name="keywords" content="Discord Bot API, Discord API, Discord Bot, Discord Bot C++, C++ CoRoutines, Fast Discord Bot Library, Discord, Bot, Library, DiscordAPI" />
17+
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
18+
<meta http-equiv="X-UA-Compatible" content="IE=11" />
19+
<meta name="generator" content="Doxygen $doxygenversion" />
20+
<meta name="viewport" content="width=device-width, initial-scale=1" />
1121

1222

13-
<!-- BEGIN opengraph metadata -->
14-
<meta property="og:title" content="DiscordCoreAPI" />
15-
<meta property="og:image" content="https://raw.githubusercontent.com/RealTimeChris/DiscordCoreAPI/main/Documentation/Images/TheLogo01.png" />
16-
<meta property="og:description" content="DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines." />
17-
<meta property="og:url" content="https://discordcoreapi.org/" />
18-
<!-- END opengraph metadata -->
23+
<!-- BEGIN opengraph metadata -->
24+
<meta property="og:description" content="An efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines.">
25+
<meta name="description" content="$title - DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines.">
26+
<meta property="og:title" content="$title - DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines.">
27+
<meta property="og:image" content="https://discordcoreapi.com/TheLogo01.png" />
28+
<meta property="og:url" content="https://discordcoreapi.com/" />
29+
<!-- END opengraph metadata -->
30+
<!-- BEGIN twitter metadata -->
31+
<meta name="twitter:image:src" content="https://raw.githubusercontent.com/RealTimeChris/DiscordCoreAPI/main/Documentation/Images/TheLogo01.png" />
32+
<meta name="twitter:title" content="DiscordCoreAPI" />
33+
<meta name="twitter:description" content="DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines." />
34+
<!-- END twitter metadata -->
35+
<!--BEGIN PROJECT_NAME-->
36+
<title>$projectname: A C++ Discord library, with custom asynchronous coroutines.</title><!--END PROJECT_NAME-->
37+
<!--BEGIN !PROJECT_NAME-->
38+
<title>$title</title><!--END !PROJECT_NAME-->
39+
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css" />
40+
<link rel="shortcut icon" href="https://raw.githubusercontent.com/RealTimeChris/DiscordCoreAPI/main/Documentation/Images/TheLogo01.png" type="image/x-icon" />
41+
<!--BEGIN DISABLE_INDEX-->
42+
<!--BEGIN FULL_SIDEBAR-->
43+
<script type="text/javascript">var page_layout = 1;</script>
44+
<!--END FULL_SIDEBAR-->
45+
<!--END DISABLE_INDEX-->
46+
<script type="text/javascript" src="$relpath^jquery.js"></script>
47+
<script type="text/javascript" src="$relpath^dynsections.js"></script>
48+
$treeview
49+
$search
50+
$mathjax
51+
$darkmode
52+
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
53+
$extrastylesheet
1954

20-
<!-- BEGIN twitter metadata -->
21-
<meta name="twitter:image:src" content="https://raw.githubusercontent.com/RealTimeChris/DiscordCoreAPI/main/Documentation/Images/TheLogo01.png" />
22-
<meta name="twitter:title" content="DiscordCoreAPI" />
23-
<meta name="twitter:description" content="DiscordCoreAPI is an efficient, fast, and easy to use Discord bot library for C++. Made using custom asynchronous CoRoutines." />
24-
<!-- END twitter metadata -->
25-
26-
<!--BEGIN PROJECT_NAME--><title>$projectname: A C++ Discord library, with custom asynchronous coroutines.</title><!--END PROJECT_NAME-->
27-
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
28-
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
29-
<link rel="shortcut icon" href="https://raw.githubusercontent.com/RealTimeChris/DiscordCoreAPI/main/Documentation/Images/TheLogo01.png" type="image/x-icon" />
30-
<!--BEGIN DISABLE_INDEX-->
31-
<!--BEGIN FULL_SIDEBAR-->
32-
<script type="text/javascript">var page_layout=1;</script>
33-
<!--END FULL_SIDEBAR-->
34-
<!--END DISABLE_INDEX-->
35-
<script type="text/javascript" src="$relpath^jquery.js"></script>
36-
<script type="text/javascript" src="$relpath^dynsections.js"></script>
37-
$treeview
38-
$search
39-
$mathjax
40-
$darkmode
41-
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
42-
$extrastylesheet
43-
44-
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
45-
<script type="text/javascript">
46-
DoxygenAwesomeDarkModeToggle.init()
47-
</script>
55+
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
56+
<script type="text/javascript">
57+
DoxygenAwesomeDarkModeToggle.init()
58+
</script>
4859

4960

5061
</head>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Login/Setup {#login_setup}
2+
============
3+
4+
* \subpage beginnernotes
5+
6+
* \subpage logininstantiation
7+
8+
* \subpage addingcommand
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Guides {#guides}
2+
============
3+
* \subpage MusicBotGuide
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
General Usage {#general_usage}
2+
============
3+
4+
* \subpage runningcommand
5+
6+
* \subpage runningfunctiontimer
7+
8+
* \subpage listeningforevent
9+
10+
* \subpage usingmessagecollector
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Autocompletes {#auto_completes}
2+
============
3+
* \subpage instantiatingcreatingautocomplete
4+
5+
* \subpage collectingautocompleteinput
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Buttons {#buttons}
2+
============
3+
* \subpage instantiatingcreatingbutton
4+
5+
* \subpage collectingbuttoninput

0 commit comments

Comments
 (0)