212 Commits

Author SHA1 Message Date
d5f78c831e Update version to 1.0.4.0 2024-05-10 15:00:47 +03:00
7847c6cc8d Merge with preview. Version 1.0.4 2024-05-10 14:57:00 +03:00
82716a4f4f update builder 2024-05-10 14:55:19 +03:00
9476f9ec31 Added InternalActionOption in ICommandAction interface.
Updated ConsoleUtilities and removed obsolete functions.
2024-05-10 14:39:39 +03:00
dc787ac130 fixed maxParallel downloads default value not being automatically selected at first boot 2024-05-09 22:17:53 +03:00
9525394a6e Updated discord.net library to version 3.14.1. Added method in SettingsDictionary to bulk check if keys are in dictionary. 2024-05-08 14:58:15 +03:00
fc93255503 switched plugin update message to logger instead of Console 2024-04-19 01:01:28 +03:00
cadf500400 Fixed some issues with SettingsDictionary 2024-04-19 00:57:28 +03:00
780614e1e7 gitignore updated 2024-04-19 00:57:09 +03:00
f32920c564 The slash commands can now use interactions 2024-04-17 17:45:35 +03:00
123e8e90a1 Fixed some null errors 2024-04-09 20:40:18 +03:00
0323c888b3 Updated readme 2024-04-01 01:36:45 +03:00
1bb6d3b731 Small refactor 2024-04-01 01:35:20 +03:00
4dc5819c4e The bot now checks for update 2024-04-01 01:33:45 +03:00
5d4fa6fba7 plugin list command now shows if the plugin is already installed. 2024-03-26 23:54:44 +02:00
b6675af9cb Updated readme 2024-03-23 22:53:52 +02:00
23a914d2c9 Fixed loading problem on Discord Bot UI 2024-03-23 22:34:55 +02:00
e8822deeac New UI page 2024-03-07 14:15:50 +02:00
29ecdb6883 Updated UI 2024-03-05 23:16:24 +02:00
90aa5875b5 Added Basic UI Functionality 2024-03-03 18:00:43 +02:00
0fccf706a1 Fixed some errors on SettingsDictionary 2024-03-03 15:07:06 +02:00
fd9cd49844 Deleting plugins is now available 2024-02-28 13:57:12 +02:00
3c3c6a1301 Updated 2024-02-27 22:20:25 +02:00
a2179787b9 Plugin Updater 2024-02-27 19:42:59 +02:00
8c06df9110 Removed help app 2024-02-27 11:09:28 +02:00
ef7a2c0896 Formatted code and rebuilt PluginLoader 2024-02-27 11:07:27 +02:00
14f280baef Moved to Json Database for online plugins 2024-02-26 23:36:19 +02:00
196fb6d3d1 Code formatting and renamed DBCommandExecutingArguments to DbCommandExecutingArguments 2024-02-24 23:22:02 +02:00
cc355d7d4f Fixed some names 2023-12-27 18:24:32 +02:00
af90ae5fba Added UI support for LINUX KDE Plasma 2023-12-27 18:03:26 +02:00
c8480b3c83 Added Channel to DBCommandExecutingArguments.cs 2023-12-17 17:14:48 +02:00
fe32ebc4d7 Fixed bug in linux version for downloading the first plugin only whatever the plugin name was 2023-12-17 16:44:52 +02:00
2280957ea9 Fixed some warnings 2023-11-21 22:07:28 +02:00
944d59d9a3 Reformatting code 2023-11-21 22:04:38 +02:00
79ecff971b Playing with tests 2023-11-20 13:43:43 +02:00
1f0e6516fd New SqlDatabase functions 2023-11-07 10:13:22 +02:00
692f3d8f8c Merge remote-tracking branch 'origin/preview' into preview 2023-10-31 17:36:13 +02:00
6d41d51694 Added config to set the max concurrent downloads 2023-10-31 17:35:58 +02:00
5f23bdadcf Fixed error on ubuntu downloading the wrong plugins 2023-10-30 11:07:59 +02:00
d3555b6fca fixed typo 2023-10-25 10:08:13 +03:00
b5cdc0afeb Merged errors with logs 2023-10-22 13:38:40 +03:00
3858156393 Made Entry Class static 2023-10-22 12:52:52 +03:00
6279c5c3a9 Updated Logger and Created Command to change settings variables 2023-10-01 14:11:34 +03:00
f58a57c6cd Improved logging. 2023-09-26 21:46:54 +03:00
d00ebfd7ed Fixed new name in README 2023-09-25 22:14:53 +03:00
ab279bd284 updated README.md 2023-09-25 22:12:44 +03:00
89c4932cd7 Fixed plugin refresh command and added new method for executing tasks without return type in ConsoleUtilities 2023-09-25 22:06:42 +03:00
c577f625c2 New method to execute using a progress bar feedback on process 2023-09-18 23:54:04 +03:00
58624f4037 Improved download speed and started using Spectre.Console package 2023-09-18 23:13:44 +03:00
c9249dc71b Plugin install does not display all logs when reloading plugin list 2023-09-07 14:55:09 +03:00
5e4f1ca35f The plugin install command now automatically refreshes the installed plugins. 2023-09-07 14:43:10 +03:00
0d8fdb5904 Updated log manager 2023-09-07 13:28:49 +03:00
92a18e3495 Removed URLs file from bot config 2023-09-07 12:50:36 +03:00
e929646e8e removed error when invalid plugin. It was called even when a typo was made 2023-08-15 16:42:13 +03:00
6315d13d18 Fixed Internal Actions to refresh after external actions are loaded 2023-08-15 16:17:32 +03:00
ee527bb36f a 2023-08-08 22:21:36 +03:00
86514d1770 Fixed version 2023-08-08 22:20:16 +03:00
9e8ed1e911 Fixed version 2023-08-08 22:19:29 +03:00
f3c3c7939c Fixed some outputs in plugin manager 2023-08-06 17:37:02 +03:00
361ed37362 Reimplemented error handling for SettingsFile 2023-08-06 17:14:57 +03:00
ed3128b940 Created a batch file to build on windows 2023-08-06 14:25:18 +03:00
6bbd68a135 Fixed release Config not found bug 2023-08-05 21:54:05 +03:00
06d322b5b3 Removed temp file creation 2023-08-05 21:53:08 +03:00
5497ee9119 - 2023-08-05 21:33:16 +03:00
0aa78e3560 Changed README.md 2023-08-05 21:32:49 +03:00
41ad37b3bb Fixed a bug when loading empty json file 2023-08-05 21:25:47 +03:00
0104d09509 Delete .github/workflows directory 2023-08-01 21:33:45 +03:00
b4f5e40f12 Moved items and reimplemented SettingsDictionary.cs 2023-08-01 21:28:44 +03:00
7107b17f19 Update README.md 2023-07-31 22:15:24 +03:00
42e1fd917e Removed some logs from console about json files that are opened 2023-07-31 22:10:26 +03:00
9e6fcdbe6f removed submodules 2023-07-31 21:47:43 +03:00
a24d8aa222 Removed dependencies 2023-07-31 21:11:17 +03:00
0e5c9ff14b Fixed help message on /help command 2023-07-31 20:55:38 +03:00
f8977d8840 Update submodules 2023-07-30 23:09:34 +03:00
bb9768f3a1 patch 2023-07-30 22:30:53 +03:00
b3d6930142 Updated functions in Discord Bot 2023-07-30 22:26:43 +03:00
5254be44be Added plugins folder to solution 2023-07-30 18:36:41 +03:00
207e0d6abd Added plugins submodule 2023-07-30 18:32:47 +03:00
968d23380f message 2023-07-30 18:31:06 +03:00
fff9e2e897 - 2023-07-30 18:27:05 +03:00
3e4e777d8d updated project file 2023-07-30 18:22:20 +03:00
7f906d400f - 2023-07-20 20:38:52 +03:00
c1161a3bca Bot no longer exits when a plugin fails to load 2023-07-20 11:32:15 +03:00
ac512e3a27 Updated display when installing a new plugin 2023-07-16 00:18:27 +03:00
730b628fe3 New method in archive manager and shortcut on exit command 2023-07-15 23:23:06 +03:00
701edc5c6a Update README.md 2023-07-10 21:29:36 +03:00
e7688762b8 Moved to API v11 due to the discriminator removal from discord 2023-07-05 21:01:51 +03:00
a7a71bf49a The logger now supports colors 2023-07-05 19:30:38 +03:00
ac7212ca00 Merge remote-tracking branch 'origin/preview' into preview 2023-07-03 14:40:08 +03:00
298e557260 Fixed some text and added some missing texts to commands. Added new command to clear screen and formated code. 2023-07-03 14:39:50 +03:00
7ba791f906 Create dotnet.yml 2023-07-01 17:37:59 +03:00
4a6a12baae Moved to API v3.10.0 2023-06-26 14:55:54 +03:00
f1dda5da3c Added new functions into Functions.cs and added help command for slash Commands. 2023-06-26 14:51:15 +03:00
3ab96e2d0d Fixed some warnings 2023-06-25 21:35:53 +03:00
970c519a32 Fixed loading plugins at startup 2023-06-15 22:12:15 +03:00
188920ec7f Cleaned up after removal of old commands 2023-06-15 21:59:48 +03:00
dcfc4ea32f Removed ConsoleCommandsHandler_OLD.cs 2023-06-15 21:57:22 +03:00
a8c02176d3 Fixed bug in PluginManager at getting info about plugin & new console commands 2023-06-15 21:55:42 +03:00
1665d47a25 Fixed a bug with invalid token bot startup 2023-06-15 14:46:28 +03:00
0b2f1e6ab6 Reimplemented Command Actions. 2023-06-07 20:36:11 +03:00
bcd9245502 update to display the changelogs for application when an update was found 2023-05-28 19:17:06 +03:00
59da9b295b 2023-05-28 19:14:39 +03:00
99d7d5e7e7 self update removed 2023-05-28 19:08:23 +03:00
e4c60f1606 builder added 2023-05-28 17:54:14 +03:00
77f1bef862 Changed from TextType to LogLevel 2023-05-28 17:37:19 +03:00
f16c139362 The bot is running on the main Thread now 2023-05-28 17:18:55 +03:00
c94cdca6eb New plugin downloader based on threads 2023-05-27 16:28:01 +03:00
dcdf80112d Merge branch 'preview' of https://github.com/Wizzy69/SethDiscordBot into preview 2023-05-23 17:00:14 +03:00
eb836c5b74 2023-05-23 17:00:10 +03:00
de680c6771 removed the economy plugin from the sln 2023-05-21 10:28:08 +03:00
Wizzy69
bcef58a46b Removed plugins from the project and reworked the Plugin Manager 2023-04-29 19:35:19 +03:00
Wizzy69
0dc8cdbce5 2023-04-29 18:57:33 +03:00
Wizzy69
dbdbaa9802 2023-04-29 18:57:26 +03:00
Tudor Andrei
5edcf93371 cleaning up PluginManager (phase 1) 2023-04-25 14:27:55 +03:00
Andrei Tudor
b0be76c62b Created new logger 2023-04-20 19:52:55 +03:00
75a77389a8 2023-04-13 19:58:16 +03:00
0bbced3d58 patch 2023-04-09 20:47:21 +03:00
244209093e patch on discord bot UI 2023-04-08 15:54:39 +03:00
54a68d635d 2023-04-08 13:48:53 +03:00
d7a5cb5a64 updated .vscode 2023-04-08 13:45:41 +03:00
6124f89cb0 updated to start the webpage at startup 2023-04-08 13:33:16 +03:00
810a527cc1 Discord Bot web UI first preview 2023-04-08 13:18:25 +03:00
0a2dff0c6d 2023-04-07 10:02:40 +03:00
382c376c03 2023-04-07 10:01:10 +03:00
84b7d663bc fixed README 2023-04-07 09:59:41 +03:00
623232b67e added documentation to the sql database class 2023-04-07 09:42:36 +03:00
d5df6cfb9d update 2023-04-05 20:10:43 +03:00
10b9548c29 Delete test directory 2023-04-01 16:16:02 +03:00
fa1a136ef1 2023-04-01 16:15:49 +03:00
d20cb62139 Updated initial setup 2023-04-01 16:14:04 +03:00
f2418d0395 fixed start error when no config file exists or is null 2023-03-25 11:51:48 +02:00
460a85944a changed to .json file instead of database for settings 2023-03-24 21:52:03 +02:00
7e2fa02d07 2023-03-11 00:07:11 +02:00
873855937f 2023-02-24 16:46:59 +02:00
1cdd2644df 2023-02-24 11:37:21 +02:00
532540b74f 2023-02-24 11:36:43 +02:00
9ba4ca43e2 Update 2023-02-24 11:12:23 +02:00
8bcaf3f254 2023-02-14 11:33:03 +02:00
0d5c90323a 2023-02-12 12:25:53 +02:00
5b01b15216 Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2023-01-31 16:08:02 +02:00
4f18f505f4 Updated to allow mention as command prefix. Updated DBCommand 2023-01-31 16:07:53 +02:00
2d3566a01a 2023-01-12 15:21:45 +02:00
22f2cd4e59 linux updater 2023-01-10 19:42:10 +02:00
1683234376 updater for linux is now working 2023-01-10 19:41:03 +02:00
69d99b4189 Updated Logger and message handler. Updated to latest Discord.Net version 2023-01-01 21:55:29 +02:00
4a5e0ef2f3 2022-12-17 12:38:21 +02:00
79731a9704 2022-12-17 12:35:26 +02:00
bd53d099d1 2022-12-09 14:49:05 +02:00
de61f5de88 2022-12-09 14:49:03 +02:00
0527d43dd2 patch 2022-12-09 14:46:10 +02:00
e3511cd96b 2022-11-18 10:45:43 +02:00
d355d3c9b7 2022-11-18 10:38:47 +02:00
5bb13aa4a6 The library can now be used for Windows exclusive bots (Made with WinForm or Wpf) 2022-11-13 16:28:44 +02:00
655f5e2ce0 2022-11-12 12:20:02 +02:00
9014d78a7d 2022-11-04 14:08:35 +02:00
1c026e7f49 patch 2022-11-02 19:42:58 +02:00
d32b3902c9 2022-11-02 18:59:33 +02:00
e5f3aff39a patch (database & slash commands) 2022-11-02 15:35:18 +02:00
11ec02ef68 Changed Config System 2022-10-25 21:37:52 +03:00
cad19935d5 Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2022-10-23 20:11:47 +03:00
47f88f167f patch 2022-10-23 20:11:27 +03:00
9d6c335799 2022-10-23 11:08:46 +03:00
cbaf552e7a 2022-10-22 16:02:05 +03:00
a4975a4578 Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2022-10-22 14:45:35 +03:00
725d02d152 2022-10-22 14:44:55 +03:00
ae7118e89a Update to Discord.Net 3.8.1 (API v10) 2022-10-22 13:55:48 +03:00
cad3bb5b75 2022-10-14 12:44:44 +03:00
269d7d56ff 2022-10-14 12:44:21 +03:00
403c023191 2022-10-14 11:13:09 +03:00
3f7a8e04d4 2022-10-14 11:06:56 +03:00
0abbd24b86 Code cleanup 2022-10-12 20:29:00 +03:00
21f1975fbc 2022-10-09 20:59:16 +03:00
d6f072904e patch 2022-10-09 20:26:39 +03:00
6fc491a0d6 2022-10-07 13:36:15 +03:00
7bc9db03f0 patch 2022-10-03 21:46:34 +03:00
641f0f2856 patch 2022-10-03 21:28:52 +03:00
ef5439d204 2022-10-01 20:59:46 +03:00
c2093c2aca added support for GUI 2022-10-01 20:59:08 +03:00
a39f7bb0c9 patch 2022-10-01 17:14:19 +03:00
6d73ec7f24 Linux compatibility update 2022-09-26 19:30:53 +03:00
24d4bee85b Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2022-09-25 23:03:48 +03:00
a1bde013e6 2022-09-25 23:03:18 +03:00
23f951167b 2022-09-24 15:00:02 +03:00
26505fd5c9 2022-09-22 10:39:51 +03:00
28fff8db8a 2022-09-16 17:47:01 +03:00
fa15bc2333 Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2022-09-16 17:37:08 +03:00
113c64279f 2022-09-16 17:37:01 +03:00
81cc6709d6 patch 2022-09-10 16:47:00 +03:00
571c0a5360 patch 2022-09-10 16:46:48 +03:00
Wizzy69
eefdea2de9 Delete .idea/.idea.SethDiscordBot/.idea directory 2022-09-09 17:18:28 +03:00
f7e6b0a398 DBCommand interface update & all other plugins were updated 2022-09-03 16:28:03 +03:00
68a83b052a Updater added 2022-08-28 12:59:41 +03:00
d689eee7fa 2022-08-26 10:42:15 +03:00
f6442af30c patch: listplugs, plugin version system and progress bar 2022-08-25 15:15:47 +03:00
b98f57fcf8 Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2022-08-24 21:34:13 +03:00
77aad985fa Added a new ProgressBar type 2022-08-24 21:34:06 +03:00
Wizzy69
f8ebf76f92 Delete .idea/.idea.SethDiscordBot/.idea directory 2022-08-20 20:52:21 +03:00
6da9828e5c improved save method 2022-08-20 17:44:19 +03:00
3ba45790e7 Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2022-08-17 20:31:55 +03:00
e440e97948 2022-08-17 20:31:52 +03:00
Wizzy69
938c73c810 Delete DiscordBotConsoleLauncher directory 2022-08-17 20:31:28 +03:00
a8520c8c96 fixed some bugs 2022-08-17 20:23:06 +03:00
debdc58646 The ability to remove a plugin has been added 2022-08-17 20:12:31 +03:00
8b36c086ef New Command added & Leveling System update 2022-08-17 14:19:46 +03:00
1f5e5d0611 patch 2022-08-17 10:09:02 +03:00
bbc1c601c9 Patching system build 2 2022-08-17 09:58:54 +03:00
5ab3195956 2022-08-16 23:08:56 +03:00
1f1983480a 2022-08-16 16:14:25 +03:00
2fcd86cf12 Merge branch 'preview' of https://github.com/Wizzy69/DiscordBotWithAPI into preview 2022-08-16 16:12:38 +03:00
2c83d00c00 2022-08-16 16:12:14 +03:00
Wizzy69
ccac0ca6d0 Update README.md 2022-07-26 15:15:13 +03:00
4c9c7410f0 2022-07-17 19:31:59 +03:00
147 changed files with 5614 additions and 5378 deletions

14
.gitignore vendored
View File

@@ -98,6 +98,7 @@ StyleCopReport.xml
*.pidb
*.svclog
*.scc
*.code-workspace
# Chutzpah Test files
_Chutzpah*
@@ -363,4 +364,15 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
*.txt
*.txt
#folders
/Plugins/
/DiscordBot.rar
/DiscordBot/Data/
/DiscordBot/Updater/
.idea/
DiscordBot/Launcher.exe
DiscordBotUI/bin
DiscordBotUI/obj
/.vscode

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,268 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"CMD_LevelingSystem/1.0.0": {
"dependencies": {
"PluginManager": "1.0.0"
},
"runtime": {
"CMD_LevelingSystem.dll": {}
}
},
"Discord.Net/3.5.0": {
"dependencies": {
"Discord.Net.Commands": "3.5.0",
"Discord.Net.Core": "3.5.0",
"Discord.Net.Interactions": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Discord.Net.Webhook": "3.5.0"
}
},
"Discord.Net.Commands/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Commands.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Core/3.5.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.Collections.Immutable": "5.0.0",
"System.Interactive.Async": "5.0.0",
"System.ValueTuple": "4.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Core.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Interactions/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"System.Collections.Immutable": "5.0.0",
"System.Reactive": "5.0.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Interactions.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Rest/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Rest.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Webhook/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Webhook.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.WebSocket/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.WebSocket.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"System.Collections.Immutable/5.0.0": {},
"System.Interactive.Async/5.0.0": {
"dependencies": {
"System.Linq.Async": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/System.Interactive.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Linq.Async/5.0.0": {
"runtime": {
"lib/netcoreapp3.1/System.Linq.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.ValueTuple/4.5.0": {},
"PluginManager/1.0.0": {
"dependencies": {
"Discord.Net": "3.5.0"
},
"runtime": {
"PluginManager.dll": {}
}
}
}
},
"libraries": {
"CMD_LevelingSystem/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Discord.Net/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IUtexpvogudb1rllKBWkIEpBVQoToMjtVo81KPkt+gNMe7KtRDcZJgcn6+72viMtyw0e95OJPXFV5VEA/n2OQQ==",
"path": "discord.net/3.5.0",
"hashPath": "discord.net.3.5.0.nupkg.sha512"
},
"Discord.Net.Commands/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ClTv8aiTlitvS48YatRiTLvgE2f2uKgmHNPVBIuvJBHZO2u4bZCzoN1fid+pZn2sbVOkt8uftlLGzz5DSZlFIA==",
"path": "discord.net.commands/3.5.0",
"hashPath": "discord.net.commands.3.5.0.nupkg.sha512"
},
"Discord.Net.Core/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rCzzaznMVQ+bLMxOpYwTyqm9V22kMy6BxlQisSxemHZDe2Jedz3Clp/a0dToACLz+Dlp3u+jYUfCBnTz7L6f4g==",
"path": "discord.net.core/3.5.0",
"hashPath": "discord.net.core.3.5.0.nupkg.sha512"
},
"Discord.Net.Interactions/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wE9+V9DJ7r+1s4euOi4sGPIAt4sD7r+Tk5s9mrlbLCHVQTK4KllAvcrL25bPFI38FuFceREEzFoRlTrekSyB2Q==",
"path": "discord.net.interactions/3.5.0",
"hashPath": "discord.net.interactions.3.5.0.nupkg.sha512"
},
"Discord.Net.Rest/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BnTdLFuuQsKvCv08VQrD4X1Hw2Xp+MELIRQiDiKfG01IiQlRTN+1gc3LB1zXgn5xBvC0HXjHxwV22GrMD9uKHQ==",
"path": "discord.net.rest/3.5.0",
"hashPath": "discord.net.rest.3.5.0.nupkg.sha512"
},
"Discord.Net.Webhook/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vCIGZS+m88sQDuFmdbUqg+2RIXS/NJWx8ei3MX+ZEYiAvOkDgQfkIlEnU1NKpds6ivTt5GFlv6UzcWubb5VJ1w==",
"path": "discord.net.webhook/3.5.0",
"hashPath": "discord.net.webhook.3.5.0.nupkg.sha512"
},
"Discord.Net.WebSocket/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LjBOvcP40vJ+dhOtBDi8haEeblPAKpAIqR04NBzTM1/0RVavJZH89ovfSQIk42ygkiOaDV4E2x0Mmh6DRoIYcw==",
"path": "discord.net.websocket/3.5.0",
"hashPath": "discord.net.websocket.3.5.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Interactive.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==",
"path": "system.interactive.async/5.0.0",
"hashPath": "system.interactive.async.5.0.0.nupkg.sha512"
},
"System.Linq.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==",
"path": "system.linq.async/5.0.0",
"hashPath": "system.linq.async.5.0.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.ValueTuple/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==",
"path": "system.valuetuple/4.5.0",
"hashPath": "system.valuetuple.4.5.0.nupkg.sha512"
},
"PluginManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

View File

@@ -1,268 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"CMD_Utils/1.0.0": {
"dependencies": {
"PluginManager": "1.0.0"
},
"runtime": {
"CMD_Utils.dll": {}
}
},
"Discord.Net/3.5.0": {
"dependencies": {
"Discord.Net.Commands": "3.5.0",
"Discord.Net.Core": "3.5.0",
"Discord.Net.Interactions": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Discord.Net.Webhook": "3.5.0"
}
},
"Discord.Net.Commands/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Commands.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Core/3.5.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.Collections.Immutable": "5.0.0",
"System.Interactive.Async": "5.0.0",
"System.ValueTuple": "4.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Core.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Interactions/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"System.Collections.Immutable": "5.0.0",
"System.Reactive": "5.0.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Interactions.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Rest/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Rest.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Webhook/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Webhook.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.WebSocket/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.WebSocket.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"System.Collections.Immutable/5.0.0": {},
"System.Interactive.Async/5.0.0": {
"dependencies": {
"System.Linq.Async": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/System.Interactive.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Linq.Async/5.0.0": {
"runtime": {
"lib/netcoreapp3.1/System.Linq.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.ValueTuple/4.5.0": {},
"PluginManager/1.0.0": {
"dependencies": {
"Discord.Net": "3.5.0"
},
"runtime": {
"PluginManager.dll": {}
}
}
}
},
"libraries": {
"CMD_Utils/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Discord.Net/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IUtexpvogudb1rllKBWkIEpBVQoToMjtVo81KPkt+gNMe7KtRDcZJgcn6+72viMtyw0e95OJPXFV5VEA/n2OQQ==",
"path": "discord.net/3.5.0",
"hashPath": "discord.net.3.5.0.nupkg.sha512"
},
"Discord.Net.Commands/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ClTv8aiTlitvS48YatRiTLvgE2f2uKgmHNPVBIuvJBHZO2u4bZCzoN1fid+pZn2sbVOkt8uftlLGzz5DSZlFIA==",
"path": "discord.net.commands/3.5.0",
"hashPath": "discord.net.commands.3.5.0.nupkg.sha512"
},
"Discord.Net.Core/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rCzzaznMVQ+bLMxOpYwTyqm9V22kMy6BxlQisSxemHZDe2Jedz3Clp/a0dToACLz+Dlp3u+jYUfCBnTz7L6f4g==",
"path": "discord.net.core/3.5.0",
"hashPath": "discord.net.core.3.5.0.nupkg.sha512"
},
"Discord.Net.Interactions/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wE9+V9DJ7r+1s4euOi4sGPIAt4sD7r+Tk5s9mrlbLCHVQTK4KllAvcrL25bPFI38FuFceREEzFoRlTrekSyB2Q==",
"path": "discord.net.interactions/3.5.0",
"hashPath": "discord.net.interactions.3.5.0.nupkg.sha512"
},
"Discord.Net.Rest/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BnTdLFuuQsKvCv08VQrD4X1Hw2Xp+MELIRQiDiKfG01IiQlRTN+1gc3LB1zXgn5xBvC0HXjHxwV22GrMD9uKHQ==",
"path": "discord.net.rest/3.5.0",
"hashPath": "discord.net.rest.3.5.0.nupkg.sha512"
},
"Discord.Net.Webhook/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vCIGZS+m88sQDuFmdbUqg+2RIXS/NJWx8ei3MX+ZEYiAvOkDgQfkIlEnU1NKpds6ivTt5GFlv6UzcWubb5VJ1w==",
"path": "discord.net.webhook/3.5.0",
"hashPath": "discord.net.webhook.3.5.0.nupkg.sha512"
},
"Discord.Net.WebSocket/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LjBOvcP40vJ+dhOtBDi8haEeblPAKpAIqR04NBzTM1/0RVavJZH89ovfSQIk42ygkiOaDV4E2x0Mmh6DRoIYcw==",
"path": "discord.net.websocket/3.5.0",
"hashPath": "discord.net.websocket.3.5.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Interactive.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==",
"path": "system.interactive.async/5.0.0",
"hashPath": "system.interactive.async.5.0.0.nupkg.sha512"
},
"System.Linq.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==",
"path": "system.linq.async/5.0.0",
"hashPath": "system.linq.async.5.0.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.ValueTuple/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==",
"path": "system.valuetuple/4.5.0",
"hashPath": "system.valuetuple.4.5.0.nupkg.sha512"
},
"PluginManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

View File

@@ -1,268 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"EVE_LevelingSystem/1.0.0": {
"dependencies": {
"PluginManager": "1.0.0"
},
"runtime": {
"EVE_LevelingSystem.dll": {}
}
},
"Discord.Net/3.5.0": {
"dependencies": {
"Discord.Net.Commands": "3.5.0",
"Discord.Net.Core": "3.5.0",
"Discord.Net.Interactions": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Discord.Net.Webhook": "3.5.0"
}
},
"Discord.Net.Commands/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Commands.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Core/3.5.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.Collections.Immutable": "5.0.0",
"System.Interactive.Async": "5.0.0",
"System.ValueTuple": "4.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Core.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Interactions/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"System.Collections.Immutable": "5.0.0",
"System.Reactive": "5.0.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Interactions.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Rest/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Rest.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Webhook/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Webhook.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.WebSocket/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.WebSocket.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"System.Collections.Immutable/5.0.0": {},
"System.Interactive.Async/5.0.0": {
"dependencies": {
"System.Linq.Async": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/System.Interactive.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Linq.Async/5.0.0": {
"runtime": {
"lib/netcoreapp3.1/System.Linq.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.ValueTuple/4.5.0": {},
"PluginManager/1.0.0": {
"dependencies": {
"Discord.Net": "3.5.0"
},
"runtime": {
"PluginManager.dll": {}
}
}
}
},
"libraries": {
"EVE_LevelingSystem/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Discord.Net/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IUtexpvogudb1rllKBWkIEpBVQoToMjtVo81KPkt+gNMe7KtRDcZJgcn6+72viMtyw0e95OJPXFV5VEA/n2OQQ==",
"path": "discord.net/3.5.0",
"hashPath": "discord.net.3.5.0.nupkg.sha512"
},
"Discord.Net.Commands/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ClTv8aiTlitvS48YatRiTLvgE2f2uKgmHNPVBIuvJBHZO2u4bZCzoN1fid+pZn2sbVOkt8uftlLGzz5DSZlFIA==",
"path": "discord.net.commands/3.5.0",
"hashPath": "discord.net.commands.3.5.0.nupkg.sha512"
},
"Discord.Net.Core/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rCzzaznMVQ+bLMxOpYwTyqm9V22kMy6BxlQisSxemHZDe2Jedz3Clp/a0dToACLz+Dlp3u+jYUfCBnTz7L6f4g==",
"path": "discord.net.core/3.5.0",
"hashPath": "discord.net.core.3.5.0.nupkg.sha512"
},
"Discord.Net.Interactions/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wE9+V9DJ7r+1s4euOi4sGPIAt4sD7r+Tk5s9mrlbLCHVQTK4KllAvcrL25bPFI38FuFceREEzFoRlTrekSyB2Q==",
"path": "discord.net.interactions/3.5.0",
"hashPath": "discord.net.interactions.3.5.0.nupkg.sha512"
},
"Discord.Net.Rest/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BnTdLFuuQsKvCv08VQrD4X1Hw2Xp+MELIRQiDiKfG01IiQlRTN+1gc3LB1zXgn5xBvC0HXjHxwV22GrMD9uKHQ==",
"path": "discord.net.rest/3.5.0",
"hashPath": "discord.net.rest.3.5.0.nupkg.sha512"
},
"Discord.Net.Webhook/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vCIGZS+m88sQDuFmdbUqg+2RIXS/NJWx8ei3MX+ZEYiAvOkDgQfkIlEnU1NKpds6ivTt5GFlv6UzcWubb5VJ1w==",
"path": "discord.net.webhook/3.5.0",
"hashPath": "discord.net.webhook.3.5.0.nupkg.sha512"
},
"Discord.Net.WebSocket/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LjBOvcP40vJ+dhOtBDi8haEeblPAKpAIqR04NBzTM1/0RVavJZH89ovfSQIk42ygkiOaDV4E2x0Mmh6DRoIYcw==",
"path": "discord.net.websocket/3.5.0",
"hashPath": "discord.net.websocket.3.5.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Interactive.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==",
"path": "system.interactive.async/5.0.0",
"hashPath": "system.interactive.async.5.0.0.nupkg.sha512"
},
"System.Linq.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==",
"path": "system.linq.async/5.0.0",
"hashPath": "system.linq.async.5.0.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.ValueTuple/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==",
"path": "system.valuetuple/4.5.0",
"hashPath": "system.valuetuple.4.5.0.nupkg.sha512"
},
"PluginManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

View File

@@ -1,268 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"MusicCommands/1.0.0": {
"dependencies": {
"PluginManager": "1.0.0"
},
"runtime": {
"MusicCommands.dll": {}
}
},
"Discord.Net/3.5.0": {
"dependencies": {
"Discord.Net.Commands": "3.5.0",
"Discord.Net.Core": "3.5.0",
"Discord.Net.Interactions": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Discord.Net.Webhook": "3.5.0"
}
},
"Discord.Net.Commands/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Commands.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Core/3.5.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.Collections.Immutable": "5.0.0",
"System.Interactive.Async": "5.0.0",
"System.ValueTuple": "4.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Core.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Interactions/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"System.Collections.Immutable": "5.0.0",
"System.Reactive": "5.0.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Interactions.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Rest/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Rest.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Webhook/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Webhook.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.WebSocket/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.WebSocket.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"System.Collections.Immutable/5.0.0": {},
"System.Interactive.Async/5.0.0": {
"dependencies": {
"System.Linq.Async": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/System.Interactive.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Linq.Async/5.0.0": {
"runtime": {
"lib/netcoreapp3.1/System.Linq.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.ValueTuple/4.5.0": {},
"PluginManager/1.0.0": {
"dependencies": {
"Discord.Net": "3.5.0"
},
"runtime": {
"PluginManager.dll": {}
}
}
}
},
"libraries": {
"MusicCommands/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Discord.Net/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IUtexpvogudb1rllKBWkIEpBVQoToMjtVo81KPkt+gNMe7KtRDcZJgcn6+72viMtyw0e95OJPXFV5VEA/n2OQQ==",
"path": "discord.net/3.5.0",
"hashPath": "discord.net.3.5.0.nupkg.sha512"
},
"Discord.Net.Commands/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ClTv8aiTlitvS48YatRiTLvgE2f2uKgmHNPVBIuvJBHZO2u4bZCzoN1fid+pZn2sbVOkt8uftlLGzz5DSZlFIA==",
"path": "discord.net.commands/3.5.0",
"hashPath": "discord.net.commands.3.5.0.nupkg.sha512"
},
"Discord.Net.Core/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rCzzaznMVQ+bLMxOpYwTyqm9V22kMy6BxlQisSxemHZDe2Jedz3Clp/a0dToACLz+Dlp3u+jYUfCBnTz7L6f4g==",
"path": "discord.net.core/3.5.0",
"hashPath": "discord.net.core.3.5.0.nupkg.sha512"
},
"Discord.Net.Interactions/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wE9+V9DJ7r+1s4euOi4sGPIAt4sD7r+Tk5s9mrlbLCHVQTK4KllAvcrL25bPFI38FuFceREEzFoRlTrekSyB2Q==",
"path": "discord.net.interactions/3.5.0",
"hashPath": "discord.net.interactions.3.5.0.nupkg.sha512"
},
"Discord.Net.Rest/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BnTdLFuuQsKvCv08VQrD4X1Hw2Xp+MELIRQiDiKfG01IiQlRTN+1gc3LB1zXgn5xBvC0HXjHxwV22GrMD9uKHQ==",
"path": "discord.net.rest/3.5.0",
"hashPath": "discord.net.rest.3.5.0.nupkg.sha512"
},
"Discord.Net.Webhook/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vCIGZS+m88sQDuFmdbUqg+2RIXS/NJWx8ei3MX+ZEYiAvOkDgQfkIlEnU1NKpds6ivTt5GFlv6UzcWubb5VJ1w==",
"path": "discord.net.webhook/3.5.0",
"hashPath": "discord.net.webhook.3.5.0.nupkg.sha512"
},
"Discord.Net.WebSocket/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LjBOvcP40vJ+dhOtBDi8haEeblPAKpAIqR04NBzTM1/0RVavJZH89ovfSQIk42ygkiOaDV4E2x0Mmh6DRoIYcw==",
"path": "discord.net.websocket/3.5.0",
"hashPath": "discord.net.websocket.3.5.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Interactive.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==",
"path": "system.interactive.async/5.0.0",
"hashPath": "system.interactive.async.5.0.0.nupkg.sha512"
},
"System.Linq.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==",
"path": "system.linq.async/5.0.0",
"hashPath": "system.linq.async.5.0.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.ValueTuple/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==",
"path": "system.valuetuple/4.5.0",
"hashPath": "system.valuetuple.4.5.0.nupkg.sha512"
},
"PluginManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -1,268 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"StartupEvents/1.0.0": {
"dependencies": {
"PluginManager": "1.0.0"
},
"runtime": {
"StartupEvents.dll": {}
}
},
"Discord.Net/3.5.0": {
"dependencies": {
"Discord.Net.Commands": "3.5.0",
"Discord.Net.Core": "3.5.0",
"Discord.Net.Interactions": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Discord.Net.Webhook": "3.5.0"
}
},
"Discord.Net.Commands/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Commands.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Core/3.5.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.Collections.Immutable": "5.0.0",
"System.Interactive.Async": "5.0.0",
"System.ValueTuple": "4.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Core.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Interactions/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0",
"Discord.Net.WebSocket": "3.5.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"System.Collections.Immutable": "5.0.0",
"System.Reactive": "5.0.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Interactions.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Rest/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Rest.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.Webhook/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.Webhook.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Discord.Net.WebSocket/3.5.0": {
"dependencies": {
"Discord.Net.Core": "3.5.0",
"Discord.Net.Rest": "3.5.0"
},
"runtime": {
"lib/net5.0/Discord.Net.WebSocket.dll": {
"assemblyVersion": "3.5.0.0",
"fileVersion": "3.5.0.0"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"System.Collections.Immutable/5.0.0": {},
"System.Interactive.Async/5.0.0": {
"dependencies": {
"System.Linq.Async": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/System.Interactive.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Linq.Async/5.0.0": {
"runtime": {
"lib/netcoreapp3.1/System.Linq.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.ValueTuple/4.5.0": {},
"PluginManager/1.0.0": {
"dependencies": {
"Discord.Net": "3.5.0"
},
"runtime": {
"PluginManager.dll": {}
}
}
}
},
"libraries": {
"StartupEvents/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Discord.Net/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IUtexpvogudb1rllKBWkIEpBVQoToMjtVo81KPkt+gNMe7KtRDcZJgcn6+72viMtyw0e95OJPXFV5VEA/n2OQQ==",
"path": "discord.net/3.5.0",
"hashPath": "discord.net.3.5.0.nupkg.sha512"
},
"Discord.Net.Commands/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ClTv8aiTlitvS48YatRiTLvgE2f2uKgmHNPVBIuvJBHZO2u4bZCzoN1fid+pZn2sbVOkt8uftlLGzz5DSZlFIA==",
"path": "discord.net.commands/3.5.0",
"hashPath": "discord.net.commands.3.5.0.nupkg.sha512"
},
"Discord.Net.Core/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rCzzaznMVQ+bLMxOpYwTyqm9V22kMy6BxlQisSxemHZDe2Jedz3Clp/a0dToACLz+Dlp3u+jYUfCBnTz7L6f4g==",
"path": "discord.net.core/3.5.0",
"hashPath": "discord.net.core.3.5.0.nupkg.sha512"
},
"Discord.Net.Interactions/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wE9+V9DJ7r+1s4euOi4sGPIAt4sD7r+Tk5s9mrlbLCHVQTK4KllAvcrL25bPFI38FuFceREEzFoRlTrekSyB2Q==",
"path": "discord.net.interactions/3.5.0",
"hashPath": "discord.net.interactions.3.5.0.nupkg.sha512"
},
"Discord.Net.Rest/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BnTdLFuuQsKvCv08VQrD4X1Hw2Xp+MELIRQiDiKfG01IiQlRTN+1gc3LB1zXgn5xBvC0HXjHxwV22GrMD9uKHQ==",
"path": "discord.net.rest/3.5.0",
"hashPath": "discord.net.rest.3.5.0.nupkg.sha512"
},
"Discord.Net.Webhook/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vCIGZS+m88sQDuFmdbUqg+2RIXS/NJWx8ei3MX+ZEYiAvOkDgQfkIlEnU1NKpds6ivTt5GFlv6UzcWubb5VJ1w==",
"path": "discord.net.webhook/3.5.0",
"hashPath": "discord.net.webhook.3.5.0.nupkg.sha512"
},
"Discord.Net.WebSocket/3.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LjBOvcP40vJ+dhOtBDi8haEeblPAKpAIqR04NBzTM1/0RVavJZH89ovfSQIk42ygkiOaDV4E2x0Mmh6DRoIYcw==",
"path": "discord.net.websocket/3.5.0",
"hashPath": "discord.net.websocket.3.5.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Interactive.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==",
"path": "system.interactive.async/5.0.0",
"hashPath": "system.interactive.async.5.0.0.nupkg.sha512"
},
"System.Linq.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==",
"path": "system.linq.async/5.0.0",
"hashPath": "system.linq.async.5.0.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.ValueTuple/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==",
"path": "system.valuetuple/4.5.0",
"hashPath": "system.valuetuple.4.5.0.nupkg.sha512"
},
"PluginManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,268 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"CMD_Utils/1.0.0": {
"dependencies": {
"PluginManager": "1.0.0"
},
"runtime": {
"CMD_Utils.dll": {}
}
},
"Discord.Net/3.7.2": {
"dependencies": {
"Discord.Net.Commands": "3.7.2",
"Discord.Net.Core": "3.7.2",
"Discord.Net.Interactions": "3.7.2",
"Discord.Net.Rest": "3.7.2",
"Discord.Net.WebSocket": "3.7.2",
"Discord.Net.Webhook": "3.7.2"
}
},
"Discord.Net.Commands/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.Commands.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Core/3.7.2": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.Collections.Immutable": "5.0.0",
"System.Interactive.Async": "5.0.0",
"System.ValueTuple": "4.5.0"
},
"runtime": {
"lib/net6.0/Discord.Net.Core.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Interactions/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2",
"Discord.Net.Rest": "3.7.2",
"Discord.Net.WebSocket": "3.7.2",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"System.Collections.Immutable": "5.0.0",
"System.Reactive": "5.0.0"
},
"runtime": {
"lib/net6.0/Discord.Net.Interactions.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Rest/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.Rest.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Webhook/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2",
"Discord.Net.Rest": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.Webhook.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.WebSocket/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2",
"Discord.Net.Rest": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.WebSocket.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"System.Collections.Immutable/5.0.0": {},
"System.Interactive.Async/5.0.0": {
"dependencies": {
"System.Linq.Async": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/System.Interactive.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Linq.Async/5.0.0": {
"runtime": {
"lib/netcoreapp3.1/System.Linq.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.ValueTuple/4.5.0": {},
"PluginManager/1.0.0": {
"dependencies": {
"Discord.Net": "3.7.2"
},
"runtime": {
"PluginManager.dll": {}
}
}
}
},
"libraries": {
"CMD_Utils/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Discord.Net/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FAiCLGu5rp6+Z10FjKbbJ6LLpKjbMBGpozixkJlz5LZvuncPx8f4AWFAw7pBecKUuAh983qiZ8CZYZcNXsI4qg==",
"path": "discord.net/3.7.2",
"hashPath": "discord.net.3.7.2.nupkg.sha512"
},
"Discord.Net.Commands/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aOEGP04X64htsTr7ozKj9qHpmvOfitSw5gfR8Tw9TX0+FdswD2LNL2KfOAIaxRKZmRTm34aXQEJrVq0K8AptmQ==",
"path": "discord.net.commands/3.7.2",
"hashPath": "discord.net.commands.3.7.2.nupkg.sha512"
},
"Discord.Net.Core/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-apwswc6LjN4dj3u27SO3Hr56Jzl91wzReahieoD7IQhV+BJQaRxhTRiEEWFTrBzHfeFHEOQ7r6vZnra3zeFhKA==",
"path": "discord.net.core/3.7.2",
"hashPath": "discord.net.core.3.7.2.nupkg.sha512"
},
"Discord.Net.Interactions/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dwGhEdDB0yyo/lGtjwIDVZmsuD52di7lIZWu/sBtvvA05dMgYZq5S6ILdsBXjOyaHeXd+EV4YMlj2VS/rm619w==",
"path": "discord.net.interactions/3.7.2",
"hashPath": "discord.net.interactions.3.7.2.nupkg.sha512"
},
"Discord.Net.Rest/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dyp8YaMBNJ837EH1KNz2PNGZqc2y71WFd1+pdldF+pLQJ3Gf/+V7685paAR7bQw7yFNyqEBR/QRBCNp+QIQ7Wg==",
"path": "discord.net.rest/3.7.2",
"hashPath": "discord.net.rest.3.7.2.nupkg.sha512"
},
"Discord.Net.Webhook/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-da3i/mTq2y7mfj3xlHH14S4PivHbflJCVr8OUikJtQrxBOxvPkqP7ZYk3Y9S28q0K8qik+TUjCcjL5gELKrh/A==",
"path": "discord.net.webhook/3.7.2",
"hashPath": "discord.net.webhook.3.7.2.nupkg.sha512"
},
"Discord.Net.WebSocket/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pYCd6ET44ADaNiyEw82TaJnR7TKYHfrKCytWFWMPL5faJhoh260avZn3Hwunlf331lEQ0f4K1CujPkQbNuq7kQ==",
"path": "discord.net.websocket/3.7.2",
"hashPath": "discord.net.websocket.3.7.2.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Interactive.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==",
"path": "system.interactive.async/5.0.0",
"hashPath": "system.interactive.async.5.0.0.nupkg.sha512"
},
"System.Linq.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==",
"path": "system.linq.async/5.0.0",
"hashPath": "system.linq.async.5.0.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.ValueTuple/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==",
"path": "system.valuetuple/4.5.0",
"hashPath": "system.valuetuple.4.5.0.nupkg.sha512"
},
"PluginManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

View File

@@ -1,334 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"Music Commands/1.0.0": {
"dependencies": {
"PluginManager": "1.0.0",
"YoutubeExplode": "6.2.0"
},
"runtime": {
"Music Commands.dll": {}
}
},
"AngleSharp/0.17.0": {
"dependencies": {
"System.Buffers": "4.5.1",
"System.Text.Encoding.CodePages": "5.0.0"
},
"runtime": {
"lib/netstandard2.0/AngleSharp.dll": {
"assemblyVersion": "0.17.0.0",
"fileVersion": "0.17.0.0"
}
}
},
"Discord.Net/3.7.2": {
"dependencies": {
"Discord.Net.Commands": "3.7.2",
"Discord.Net.Core": "3.7.2",
"Discord.Net.Interactions": "3.7.2",
"Discord.Net.Rest": "3.7.2",
"Discord.Net.WebSocket": "3.7.2",
"Discord.Net.Webhook": "3.7.2"
}
},
"Discord.Net.Commands/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.Commands.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Core/3.7.2": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.Collections.Immutable": "5.0.0",
"System.Interactive.Async": "5.0.0",
"System.ValueTuple": "4.5.0"
},
"runtime": {
"lib/net6.0/Discord.Net.Core.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Interactions/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2",
"Discord.Net.Rest": "3.7.2",
"Discord.Net.WebSocket": "3.7.2",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"System.Collections.Immutable": "5.0.0",
"System.Reactive": "5.0.0"
},
"runtime": {
"lib/net6.0/Discord.Net.Interactions.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Rest/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.Rest.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.Webhook/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2",
"Discord.Net.Rest": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.Webhook.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Discord.Net.WebSocket/3.7.2": {
"dependencies": {
"Discord.Net.Core": "3.7.2",
"Discord.Net.Rest": "3.7.2"
},
"runtime": {
"lib/net6.0/Discord.Net.WebSocket.dll": {
"assemblyVersion": "3.7.2.0",
"fileVersion": "3.7.2.0"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Microsoft.NETCore.Platforms/5.0.0": {},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"System.Buffers/4.5.1": {},
"System.Collections.Immutable/5.0.0": {},
"System.Interactive.Async/5.0.0": {
"dependencies": {
"System.Linq.Async": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/System.Interactive.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Linq.Async/5.0.0": {
"runtime": {
"lib/netcoreapp3.1/System.Linq.Async.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Text.Encoding.CodePages/5.0.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0"
}
},
"System.ValueTuple/4.5.0": {},
"YoutubeExplode/6.2.0": {
"dependencies": {
"AngleSharp": "0.17.0"
},
"runtime": {
"lib/net5.0/YoutubeExplode.dll": {
"assemblyVersion": "6.2.0.0",
"fileVersion": "6.2.0.0"
}
}
},
"PluginManager/1.0.0": {
"dependencies": {
"Discord.Net": "3.7.2"
},
"runtime": {
"PluginManager.dll": {}
}
}
}
},
"libraries": {
"Music Commands/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"AngleSharp/0.17.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-74haoXINcj4SdMsmiNzk+9VUwIX1U9P61O6AZd5Uao8SGNnJJB8Y/r8VJRc8orn4c7Vk/oURAKSNF9XcSDxbfA==",
"path": "anglesharp/0.17.0",
"hashPath": "anglesharp.0.17.0.nupkg.sha512"
},
"Discord.Net/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FAiCLGu5rp6+Z10FjKbbJ6LLpKjbMBGpozixkJlz5LZvuncPx8f4AWFAw7pBecKUuAh983qiZ8CZYZcNXsI4qg==",
"path": "discord.net/3.7.2",
"hashPath": "discord.net.3.7.2.nupkg.sha512"
},
"Discord.Net.Commands/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aOEGP04X64htsTr7ozKj9qHpmvOfitSw5gfR8Tw9TX0+FdswD2LNL2KfOAIaxRKZmRTm34aXQEJrVq0K8AptmQ==",
"path": "discord.net.commands/3.7.2",
"hashPath": "discord.net.commands.3.7.2.nupkg.sha512"
},
"Discord.Net.Core/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-apwswc6LjN4dj3u27SO3Hr56Jzl91wzReahieoD7IQhV+BJQaRxhTRiEEWFTrBzHfeFHEOQ7r6vZnra3zeFhKA==",
"path": "discord.net.core/3.7.2",
"hashPath": "discord.net.core.3.7.2.nupkg.sha512"
},
"Discord.Net.Interactions/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dwGhEdDB0yyo/lGtjwIDVZmsuD52di7lIZWu/sBtvvA05dMgYZq5S6ILdsBXjOyaHeXd+EV4YMlj2VS/rm619w==",
"path": "discord.net.interactions/3.7.2",
"hashPath": "discord.net.interactions.3.7.2.nupkg.sha512"
},
"Discord.Net.Rest/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dyp8YaMBNJ837EH1KNz2PNGZqc2y71WFd1+pdldF+pLQJ3Gf/+V7685paAR7bQw7yFNyqEBR/QRBCNp+QIQ7Wg==",
"path": "discord.net.rest/3.7.2",
"hashPath": "discord.net.rest.3.7.2.nupkg.sha512"
},
"Discord.Net.Webhook/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-da3i/mTq2y7mfj3xlHH14S4PivHbflJCVr8OUikJtQrxBOxvPkqP7ZYk3Y9S28q0K8qik+TUjCcjL5gELKrh/A==",
"path": "discord.net.webhook/3.7.2",
"hashPath": "discord.net.webhook.3.7.2.nupkg.sha512"
},
"Discord.Net.WebSocket/3.7.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pYCd6ET44ADaNiyEw82TaJnR7TKYHfrKCytWFWMPL5faJhoh260avZn3Hwunlf331lEQ0f4K1CujPkQbNuq7kQ==",
"path": "discord.net.websocket/3.7.2",
"hashPath": "discord.net.websocket.3.7.2.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
"path": "microsoft.netcore.platforms/5.0.0",
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"System.Buffers/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Interactive.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==",
"path": "system.interactive.async/5.0.0",
"hashPath": "system.interactive.async.5.0.0.nupkg.sha512"
},
"System.Linq.Async/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==",
"path": "system.linq.async/5.0.0",
"hashPath": "system.linq.async.5.0.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.Text.Encoding.CodePages/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NyscU59xX6Uo91qvhOs2Ccho3AR2TnZPomo1Z0K6YpyztBPM/A5VbkzOO19sy3A3i1TtEnTxA7bCe3Us+r5MWg==",
"path": "system.text.encoding.codepages/5.0.0",
"hashPath": "system.text.encoding.codepages.5.0.0.nupkg.sha512"
},
"System.ValueTuple/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==",
"path": "system.valuetuple/4.5.0",
"hashPath": "system.valuetuple.4.5.0.nupkg.sha512"
},
"YoutubeExplode/6.2.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-oH5kst4w1QkUwRjJco0alF57JOmFofSGlPkr4OniODB8R6MEyRWn1xFg3JS2wFYd6scZluoXRDhM3/uyUjO9/g==",
"path": "youtubeexplode/6.2.0",
"hashPath": "youtubeexplode.6.2.0.nupkg.sha512"
},
"PluginManager/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -1,14 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>bin\</BaseOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PluginManager\PluginManager.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,48 +0,0 @@
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Others;
namespace CMD_LevelingSystem;
internal class Level : DBCommand
{
public string Command => "level";
public string Description => "Display tour current level";
public string Usage => "level";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
if (!File.Exists(Config.GetValue<string>("LevelingSystemPath") + $"/{message.Author.Id}.dat"))
{
await context.Channel.SendMessageAsync("You are now unranked !");
return;
}
var user = await Functions.ConvertFromJson<User>(Config.GetValue<string>("LevelingSystemPath") + $"/{message.Author.Id}.dat");
if (user == null)
{
await context.Channel.SendMessageAsync("You are now unranked !");
return;
}
var builder = new EmbedBuilder();
var r = new Random();
builder.WithColor(r.Next(256), r.Next(256), r.Next(256));
builder.AddField("Current Level", user.CurrentLevel, true)
.AddField("Current EXP", user.CurrentEXP, true)
.AddField("Required Exp", user.RequiredEXPToLevelUp, true);
builder.WithTimestamp(DateTimeOffset.Now);
await context.Channel.SendMessageAsync(embed: builder.Build());
}
}

View File

@@ -1,18 +0,0 @@
using Discord.WebSocket;
namespace CMD_LevelingSystem;
public class DiscordUser
{
public string Username { get; set; }
public ushort DiscordTag { get; set; }
public ulong userID { get; set; }
}
public class User
{
public DiscordUser user { get; set; }
public int CurrentLevel { get; set; }
public long CurrentEXP { get; set; }
public long RequiredEXPToLevelUp { get; set; }
}

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<BaseOutputPath>bin\</BaseOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\BUILDS\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PluginManager\PluginManager.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,23 +0,0 @@
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
internal class Echo : DBCommand
{
public string Command => "echo";
public string Description => "Replay with the same message";
public string Usage => "echo [message]";
public bool canUseDM => true;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
var m = message.Content.Substring(6);
await message.Channel.SendMessageAsync(m);
}
}

View File

@@ -1,30 +0,0 @@
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
namespace CMD_Utils;
internal class FlipCoin : DBCommand
{
public string Command => "flip";
public string Description => "Flip a coin";
public string Usage => "flip";
public bool canUseDM => true;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
var random = new System.Random();
var r = random.Next(1, 3);
if (r == 1)
await message.Channel.SendMessageAsync("Heads");
else
await message.Channel.SendMessageAsync("Tails");
}
}

View File

@@ -1,45 +0,0 @@
using System.Collections.Generic;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
using PluginManager.Others;
namespace CMD_Utils;
public class Poll : DBCommand
{
public string Command => "poll";
public string Description => "Create a poll with options";
public string Usage => "poll [This-is-question] [This-is-answer-1] [This-is-answer-2] ... ";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => true;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
if (isDM) return;
var question = message.Content.Split(' ')[1].Replace('-', ' ');
var answers = Functions.MergeStrings(message.Content.Split(' '), 2).Split(' ');
var embedBuilder = new EmbedBuilder();
embedBuilder.Title = question;
var len = answers.Length;
for (var i = 0; i < len; i++) embedBuilder.AddField($"Answer {i + 1}", answers[i].Replace('-', ' '), true);
var msg = await context.Channel.SendMessageAsync(embed: embedBuilder.Build());
var emotes = new List<IEmote>();
emotes.Add(Emoji.Parse(":one:"));
emotes.Add(Emoji.Parse(":two:"));
emotes.Add(Emoji.Parse(":three:"));
emotes.Add(Emoji.Parse(":four:"));
emotes.Add(Emoji.Parse(":five:"));
emotes.Add(Emoji.Parse(":six:"));
for (var i = 0; i < len; i++) await msg.AddReactionAsync(emotes[i]);
}
}

View File

@@ -1,39 +0,0 @@
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
public class Random : DBCommand
{
public string Command => "random";
public string Description => "random number between number1 and number2";
public string Usage => "random [number1] [number2]";
public bool canUseDM => true;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
try
{
var msg = message.Content;
var a = int.Parse(msg.Split(' ')[1]);
var b = int.Parse(msg.Split(' ')[2]);
if (a > b)
{
var temp = a;
a = b;
b = temp;
}
await message.Channel.SendMessageAsync("Your random generated number is " + new System.Random().Next(a, b));
}
catch
{
await message.Channel.SendMessageAsync("Invalid numbers or no numbers:\nUsage: " + Usage);
}
}
}

View File

@@ -1,4 +0,0 @@
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using PluginManager.Interfaces;
using PluginManager.Others;
using PluginManager.Others.Actions;
namespace DiscordBot.Bot.Actions;
public class Clear: ICommandAction
{
public string ActionName => "clear";
public string Description => "Clears the console";
public string Usage => "clear";
public IEnumerable<InternalActionOption> ListOfOptions => [];
public InternalActionRunType RunType => InternalActionRunType.ON_CALL;
public Task Execute(string[] args)
{
Console.Clear();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("===== Seth Discord Bot =====");
Console.ResetColor();
return Task.CompletedTask;
}
}

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Others;
using PluginManager.Others.Actions;
namespace DiscordBot.Bot.Actions;
public class Exit: ICommandAction
{
public string ActionName => "exit";
public string Description => "Exits the bot and saves the config. Use exit help for more info.";
public string Usage => "exit <option?>";
public IEnumerable<InternalActionOption> ListOfOptions => new List<InternalActionOption>
{
new InternalActionOption("help", "Displays this message"),
new InternalActionOption("force | -f", "Exits the bot without saving the config")
};
public InternalActionRunType RunType => InternalActionRunType.ON_CALL;
public async Task Execute(string[] args)
{
if (args is null || args.Length == 0)
{
Config.Logger.Log("Exiting...", typeof(ICommandAction), LogType.WARNING);
await Config.AppSettings.SaveToFile();
Environment.Exit(0);
}
else
{
switch (args[0])
{
case "help":
Console.WriteLine("Usage : exit [help|force]");
Console.WriteLine("help : Displays this message");
Console.WriteLine("force | -f : Exits the bot without saving the config");
break;
case "-f":
case "force":
Config.Logger.Log("Exiting (FORCE)...", typeof(ICommandAction), LogType.WARNING);
Environment.Exit(0);
break;
default:
Console.WriteLine("Invalid argument !");
break;
}
}
}
}

View File

@@ -0,0 +1,206 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using DiscordBot.Utilities;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Loaders;
using PluginManager.Online;
using PluginManager.Others;
using Spectre.Console;
namespace DiscordBot.Bot.Actions.Extra;
internal static class PluginMethods
{
internal static async Task List(PluginsManager manager)
{
var data = await ConsoleUtilities.ExecuteWithProgressBar(manager.GetPluginsList(), "Reading remote database");
TableData tableData = new(["Name", "Description", "Version", "Is Installed"]);
var installedPlugins = await ConsoleUtilities.ExecuteWithProgressBar(manager.GetInstalledPlugins(), "Reading local database ");
foreach (var plugin in data)
{
bool isInstalled = installedPlugins.Any(p => p.PluginName == plugin.Name);
tableData.AddRow([plugin.Name, plugin.Description, plugin.Version.ToString(), isInstalled ? "Yes" : "No"]);
}
tableData.HasRoundBorders = false;
tableData.PrintTable();
}
internal static async Task RefreshPlugins(bool quiet)
{
await Program.internalActionManager.Execute("plugin", "load", quiet ? "-q" : string.Empty);
await Program.internalActionManager.Refresh();
}
internal static async Task DownloadPlugin(PluginsManager manager, string pluginName)
{
var pluginData = await manager.GetPluginDataByName(pluginName);
if (pluginData is null)
{
Console.WriteLine($"Plugin {pluginName} not found. Please check the spelling and try again.");
return;
}
var pluginLink = pluginData.DownLoadLink;
await AnsiConsole.Progress()
.Columns(new ProgressColumn[]
{
new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()
}
)
.StartAsync(async ctx =>
{
var downloadTask = ctx.AddTask("Downloading plugin...");
IProgress<float> progress = new Progress<float>(p => { downloadTask.Value = p; });
await ServerCom.DownloadFileAsync(pluginLink, $"{Config.AppSettings["PluginFolder"]}/{pluginName}.dll", progress);
downloadTask.Increment(100);
ctx.Refresh();
}
);
if (!pluginData.HasDependencies)
{
await manager.AppendPluginToDatabase(new PluginManager.Plugin.PluginInfo(pluginName, pluginData.Version, []));
Console.WriteLine("Finished installing " + pluginName + " successfully");
await RefreshPlugins(false);
return;
}
List<Tuple<ProgressTask, IProgress<float>, string, string>> downloadTasks = new();
await AnsiConsole.Progress()
.Columns(new ProgressColumn[]
{
new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()
}
)
.StartAsync(async ctx =>
{
foreach (var dependency in pluginData.Dependencies)
{
var task = ctx.AddTask($"Downloading {dependency.DownloadLocation}: ");
IProgress<float> progress = new Progress<float>(p =>
{
task.Value = p;
}
);
task.IsIndeterminate = true;
downloadTasks.Add(new Tuple<ProgressTask, IProgress<float>, string, string>(task, progress, dependency.DownloadLink, dependency.DownloadLocation));
}
int maxParallelDownloads = 5;
if (Config.AppSettings.ContainsKey("MaxParallelDownloads"))
maxParallelDownloads = int.Parse(Config.AppSettings["MaxParallelDownloads"]);
var options = new ParallelOptions()
{
MaxDegreeOfParallelism = maxParallelDownloads,
TaskScheduler = TaskScheduler.Default
};
await Parallel.ForEachAsync(downloadTasks, options, async (tuple, token) =>
{
tuple.Item1.IsIndeterminate = false;
await ServerCom.DownloadFileAsync(tuple.Item3, $"./{tuple.Item4}", tuple.Item2);
}
);
}
);
await manager.AppendPluginToDatabase(new PluginManager.Plugin.PluginInfo(pluginName, pluginData.Version, pluginData.Dependencies.Select(sep => sep.DownloadLocation).ToList()));
await RefreshPlugins(false);
}
internal static async Task<bool> LoadPlugins(string[] args)
{
var loader = new PluginLoader(Config.DiscordBot.Client);
if (args.Length == 2 && args[1] == "-q")
{
await loader.LoadPlugins();
return true;
}
var cc = Console.ForegroundColor;
loader.OnCommandLoaded += (data) =>
{
if (data.IsSuccess)
{
Config.Logger.Log("Successfully loaded command : " + data.PluginName, typeof(ICommandAction),
LogType.INFO
);
}
else
{
Config.Logger.Log("Failed to load command : " + data.PluginName + " because " + data.ErrorMessage,
typeof(ICommandAction), LogType.ERROR
);
}
Console.ForegroundColor = cc;
};
loader.OnEventLoaded += (data) =>
{
if (data.IsSuccess)
{
Config.Logger.Log("Successfully loaded event : " + data.PluginName, typeof(ICommandAction),
LogType.INFO
);
}
else
{
Config.Logger.Log("Failed to load event : " + data.PluginName + " because " + data.ErrorMessage,
typeof(ICommandAction), LogType.ERROR
);
}
Console.ForegroundColor = cc;
};
loader.OnSlashCommandLoaded += (data) =>
{
if (data.IsSuccess)
{
Config.Logger.Log("Successfully loaded slash command : " + data.PluginName, typeof(ICommandAction),
LogType.INFO
);
}
else
{
Config.Logger.Log("Failed to load slash command : " + data.PluginName + " because " + data.ErrorMessage,
typeof(ICommandAction), LogType.ERROR
);
}
Console.ForegroundColor = cc;
};
await loader.LoadPlugins();
Console.ForegroundColor = cc;
return true;
}
}

View File

@@ -0,0 +1,45 @@
using System.Linq;
using PluginManager;
using PluginManager.Loaders;
namespace DiscordBot.Bot.Actions.Extra;
internal static class SettingsConfigExtra
{
internal static void SetSettings(string key, params string[] value)
{
if (key is null) return;
if (value is null) return;
if (!Config.AppSettings.ContainsKey(key))
return;
Config.AppSettings[key] = string.Join(' ', value);
// Config.AppSettings.SaveToFile().Wait();
}
internal static void RemoveSettings(string key)
{
if (key is null) return;
if (!Config.AppSettings.ContainsKey(key))
return;
Config.AppSettings.Remove(key);
}
internal static void AddSettings(string key, params string[] value)
{
if (key is null) return;
if (value is null) return;
if (Config.AppSettings.ContainsKey(key))
return;
Config.AppSettings.Add(key, string.Join(' ', value));
// Config.AppSettings.SaveToFile().Wait();
}
}

View File

@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DiscordBot.Utilities;
using PluginManager.Interfaces;
using PluginManager.Others;
using PluginManager.Others.Actions;
using Spectre.Console;
namespace DiscordBot.Bot.Actions;
public class Help: ICommandAction
{
public string ActionName => "help";
public string Description => "Shows the list of commands and their usage";
public string Usage => "help <command?>";
public IEnumerable<InternalActionOption> ListOfOptions => [];
public InternalActionRunType RunType => InternalActionRunType.ON_CALL;
public async Task Execute(string[] args)
{
TableData tableData = new TableData();
if (args == null || args.Length == 0)
{
tableData.Columns = ["Command", "Usage", "Description", "Options"];
foreach (var a in Program.internalActionManager.Actions)
{
Markup actionName = new Markup($"[bold]{a.Key}[/]");
Markup usage = new Markup($"[italic]{a.Value.Usage}[/]");
Markup description = new Markup($"[dim]{a.Value.Description}[/]");
if (a.Value.ListOfOptions.Any())
{
var optionsTable = new Table();
optionsTable.AddColumn("Option");
optionsTable.AddColumn("Description");
foreach (var option in a.Value.ListOfOptions)
{
optionsTable.AddRow(option.OptionName, option.OptionDescription);
}
tableData.AddRow([actionName, usage, description, optionsTable]);
}
else
{
tableData.AddRow([actionName, usage, description]);
}
}
// render the table
tableData.HasRoundBorders = true;
tableData.DisplayLinesBetweenRows = true;
tableData.PrintTable();
return;
}
if (!Program.internalActionManager.Actions.ContainsKey(args[0]))
{
Console.WriteLine("Command not found");
return;
}
var action = Program.internalActionManager.Actions[args[0]];
tableData.Columns = ["Command", "Usage", "Description"];
tableData.AddRow([action.ActionName, action.Usage, action.Description]);
tableData.PrintTable();
}
}

View File

@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DiscordBot.Bot.Actions.Extra;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Others;
using PluginManager.Others.Actions;
namespace DiscordBot.Bot.Actions;
public class Plugin: ICommandAction
{
private bool pluginsLoaded;
public string ActionName => "plugin";
public string Description => "Manages plugins. Use plugin help for more info.";
public string Usage => "plugin <option!>";
public IEnumerable<InternalActionOption> ListOfOptions => new List<InternalActionOption>
{
new InternalActionOption("help", "Displays this message"),
new InternalActionOption("list", "Lists all plugins"),
new InternalActionOption("load", "Loads all plugins"),
new InternalActionOption("install", "Installs a plugin"),
new InternalActionOption("refresh", "Refreshes the plugin list"),
new InternalActionOption("uninstall", "Uninstalls a plugin")
};
public InternalActionRunType RunType => InternalActionRunType.ON_CALL;
public async Task Execute(string[] args)
{
if (args is null || args.Length == 0 || args[0] == "help")
{
Console.WriteLine("Usage : plugin [help|list|load|install]");
Console.WriteLine("help : Displays this message");
Console.WriteLine("list : Lists all plugins");
Console.WriteLine("load : Loads all plugins");
Console.WriteLine("install : Installs a plugin");
Console.WriteLine("refresh : Refreshes the plugin list");
return;
}
switch (args[0])
{
case "refresh":
await PluginMethods.RefreshPlugins(true);
break;
case "uninstall":
string plugName = string.Join(' ', args, 1, args.Length-1);
bool result = await Config.PluginsManager.MarkPluginToUninstall(plugName);
if(result)
Console.WriteLine($"Marked to uninstall plugin {plugName}. Please restart the bot");
break;
case "list":
await PluginMethods.List(Config.PluginsManager);
break;
case "load":
if (pluginsLoaded)
{
Config.Logger.Log("Plugins already loaded", typeof(ICommandAction), LogType.WARNING);
break;
}
if (Config.DiscordBot is null)
{
Config.Logger.Log("DiscordBot is null", typeof(ICommandAction), LogType.WARNING);
break;
}
pluginsLoaded = await PluginMethods.LoadPlugins(args);
break;
case "install":
var pluginName = string.Join(' ', args, 1, args.Length - 1);
if (string.IsNullOrEmpty(pluginName) || pluginName.Length < 2)
{
Console.WriteLine("Please specify a plugin name");
Console.Write("Plugin name : ");
pluginName = Console.ReadLine();
if (string.IsNullOrEmpty(pluginName) || pluginName.Length < 2)
{
Console.WriteLine("Invalid plugin name");
break;
}
}
await PluginMethods.DownloadPlugin(Config.PluginsManager, pluginName);
break;
}
}
}

View File

@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DiscordBot.Bot.Actions.Extra;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Others;
using PluginManager.Others.Actions;
namespace DiscordBot.Bot.Actions;
public class SettingsConfig: ICommandAction
{
public string ActionName => "config";
public string Description => "Change the settings of the bot";
public string Usage => "config <options!>";
public IEnumerable<InternalActionOption> ListOfOptions => new List<InternalActionOption>
{
new InternalActionOption("help", "Displays this message"),
new InternalActionOption("set", "Set a setting"),
new InternalActionOption("remove", "Remove a setting"),
new InternalActionOption("add", "Add a setting")
};
public InternalActionRunType RunType => InternalActionRunType.ON_CALL;
public Task Execute(string[] args)
{
if (args is null)
{
foreach (var settings in Config.AppSettings)
Console.WriteLine(settings.Key + ": " + settings.Value);
return Task.CompletedTask;
}
switch (args[0])
{
case "-s":
case "set":
if (args.Length < 3)
return Task.CompletedTask;
SettingsConfigExtra.SetSettings(args[1], args[2..]);
break;
case "-r":
case "remove":
if (args.Length < 2)
return Task.CompletedTask;
SettingsConfigExtra.RemoveSettings(args[1]);
break;
case "-a":
case "add":
if (args.Length < 3)
return Task.CompletedTask;
SettingsConfigExtra.AddSettings(args[1], args[2..]);
break;
case "-h":
case "-help":
Console.WriteLine("Options:");
Console.WriteLine("-s <settingName> <newValue>: Set a setting");
Console.WriteLine("-r <settingName>: Remove a setting");
Console.WriteLine("-a <settingName> <newValue>: Add a setting");
Console.WriteLine("-h: Show this help message");
break;
default:
Console.WriteLine("Invalid option");
return Task.CompletedTask;
}
return Task.CompletedTask;
}
}

View File

@@ -0,0 +1,90 @@
using System.Collections.Generic;
using Discord;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Loaders;
using PluginManager.Others;
namespace DiscordBot.Bot.Commands;
/// <summary>
/// The help command
/// </summary>
internal class Help: DBCommand
{
/// <summary>
/// Command name
/// </summary>
public string Command => "help";
public List<string> Aliases => null;
/// <summary>
/// Command Description
/// </summary>
public string Description => "This command allows you to check all loaded commands";
/// <summary>
/// Command usage
/// </summary>
public string Usage => "help <command>";
/// <summary>
/// Check if the command require administrator to be executed
/// </summary>
public bool requireAdmin => false;
/// <summary>
/// The main body of the command
/// </summary>
/// <param name="context">The command context</param>
public void ExecuteServer(DbCommandExecutingArguments args)
{
if (args.arguments is not null)
{
var e = GenerateHelpCommand(args.arguments[0]);
if (e is null)
args.context.Channel.SendMessageAsync("Unknown Command " + args.arguments[0]);
else
args.context.Channel.SendMessageAsync(embed: e.Build());
return;
}
var embedBuilder = new EmbedBuilder();
var adminCommands = "";
var normalCommands = "";
foreach (var cmd in PluginLoader.Commands)
if (cmd.requireAdmin)
adminCommands += cmd.Command + " ";
else
normalCommands += cmd.Command + " ";
if (adminCommands.Length > 0)
embedBuilder.AddField("Admin Commands", adminCommands);
if (normalCommands.Length > 0)
embedBuilder.AddField("Normal Commands", normalCommands);
args.context.Channel.SendMessageAsync(embed: embedBuilder.Build());
}
private EmbedBuilder GenerateHelpCommand(string command)
{
var embedBuilder = new EmbedBuilder();
var cmd = PluginLoader.Commands.Find(p => p.Command == command ||
p.Aliases is not null && p.Aliases.Contains(command)
);
if (cmd == null) return null;
embedBuilder.AddField("Usage", Config.AppSettings["prefix"] + cmd.Usage);
embedBuilder.AddField("Description", cmd.Description);
if (cmd.Aliases is null)
return embedBuilder;
embedBuilder.AddField("Alias", cmd.Aliases.Count == 0 ? "-" : string.Join(", ", cmd.Aliases));
return embedBuilder;
}
}

View File

@@ -0,0 +1,59 @@
using System.Collections.Generic;
using System.Linq;
using Discord;
using Discord.WebSocket;
using PluginManager.Interfaces;
using PluginManager.Loaders;
using PluginManager.Others;
namespace DiscordBot.Bot.Commands.SlashCommands;
public class Help: DBSlashCommand
{
public string Name => "help";
public string Description => "This command allows you to check all loaded commands";
public bool canUseDM => true;
public bool HasInteraction => false;
public List<SlashCommandOptionBuilder> Options =>
new()
{
new SlashCommandOptionBuilder()
.WithName("command")
.WithDescription("The command you want to get help for")
.WithRequired(false)
.WithType(ApplicationCommandOptionType.String)
};
public async void ExecuteServer(SocketSlashCommand context)
{
EmbedBuilder embedBuilder = new();
embedBuilder.WithTitle("Help Command");
embedBuilder.WithColor(Functions.RandomColor);
var slashCommands = PluginLoader.SlashCommands;
var options = context.Data.Options;
//Console.WriteLine("Options: " + options.Count);
if (options is null || options.Count == 0)
foreach (var slashCommand in slashCommands)
embedBuilder.AddField(slashCommand.Name, slashCommand.Description);
if (options.Count > 0)
{
var commandName = options.First().Value;
var slashCommand = slashCommands.FirstOrDefault(x => x.Name.TrimEnd() == commandName.ToString());
if (slashCommand is null)
{
await context.RespondAsync("Unknown Command " + commandName);
return;
}
embedBuilder.AddField("DM Usable:", slashCommand.canUseDM, true)
.WithDescription(slashCommand.Description);
}
await context.RespondAsync(embed: embedBuilder.Build());
}
}

View File

@@ -1,100 +0,0 @@
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
using PluginManager.Loaders;
using PluginManager.Others;
namespace DiscordBot.Discord.Commands;
/// <summary>
/// The help command
/// </summary>
internal class Help : DBCommand
{
/// <summary>
/// Command name
/// </summary>
public string Command => "help";
/// <summary>
/// Command Description
/// </summary>
public string Description => "This command allows you to check all loadded commands";
/// <summary>
/// Command usage
/// </summary>
public string Usage => "help";
/// <summary>
/// Check if the command can be used <inheritdoca DM <see cref="IChannel" />/>
/// </summary>
public bool canUseDM => true;
/// <summary>
/// Check if the command can be used in a server
/// </summary>
public bool canUseServer => true;
/// <summary>
/// Check if the command require administrator to be executed
/// </summary>
public bool requireAdmin => false;
/// <summary>
/// The main body of the command
/// </summary>
/// <param name="context">The command context</param>
/// <param name="message">The command message</param>
/// <param name="client">The discord bot client</param>
/// <param name="isDM">True if the message was sent from a DM channel, false otherwise</param>
public void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
var args = Functions.GetArguments(message);
if (args.Count != 0)
{
foreach (var item in args)
{
var e = GenerateHelpCommand(item);
if (e != null)
context.Channel.SendMessageAsync(embed: e.Build());
else
context.Channel.SendMessageAsync("Unknown Command " + item);
}
return;
}
var embedBuilder = new EmbedBuilder();
var adminCommands = "";
var normalCommands = "";
var DMCommands = "";
foreach (var cmd in PluginLoader.Commands!)
{
if (cmd.canUseDM) DMCommands += cmd.Command + " ";
if (cmd.requireAdmin)
adminCommands += cmd.Command + " ";
else if (cmd.canUseServer) normalCommands += cmd.Command + " ";
}
embedBuilder.AddField("Admin Commands", adminCommands);
embedBuilder.AddField("Normal Commands", normalCommands);
embedBuilder.AddField("DM Commands", DMCommands);
context.Channel.SendMessageAsync(embed: embedBuilder.Build());
}
private EmbedBuilder GenerateHelpCommand(string command)
{
var embedBuilder = new EmbedBuilder();
var cmd = PluginLoader.Commands.Find(p => p.Command == command);
if (cmd == null) return null;
embedBuilder.AddField("Usage", cmd.Usage);
embedBuilder.AddField("Description", cmd.Description);
return embedBuilder;
}
}

View File

@@ -1,113 +0,0 @@
using System;
using System.Diagnostics;
using Discord.WebSocket;
using PluginManager.Interfaces;
using PluginManager.Others;
using PluginManager.Others.Permissions;
using DiscordLibCommands = Discord.Commands;
using DiscordLib = Discord;
using OperatingSystem = PluginManager.Others.OperatingSystem;
namespace DiscordBot.Discord.Commands;
internal class Restart : DBCommand
{
/// <summary>
/// Command name
/// </summary>
public string Command => "restart";
/// <summary>
/// Command Description
/// </summary>
public string Description => "Restart the bot";
/// <summary>
/// Command usage
/// </summary>
public string Usage => "restart [-p | -c | -args | -cmd] <args>";
/// <summary>
/// Check if the command can be used <inheritdoca DM <see cref="IChannel" />/>
/// </summary>
public bool canUseDM => false;
/// <summary>
/// Check if the command can be used in a server
/// </summary>
public bool canUseServer => true;
/// <summary>
/// Check if the command require administrator to be executed
/// </summary>
public bool requireAdmin => false;
/// <summary>
/// The main body of the command
/// </summary>
/// <param name="context">The command context</param>
/// <param name="message">The command message</param>
/// <param name="client">The discord bot client</param>
/// <param name="isDM">True if the message was sent from a DM channel, false otherwise</param>
public async void Execute(DiscordLibCommands.SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
if (!(message.Author as SocketGuildUser).hasPermission(DiscordLib.GuildPermission.Administrator)) return;
var args = Functions.GetArguments(message);
var OS = Functions.GetOperatingSystem();
if (args.Count == 0)
{
switch (OS)
{
case OperatingSystem.WINDOWS:
Process.Start("./DiscordBot.exe");
break;
case OperatingSystem.LINUX:
case OperatingSystem.MAC_OS:
Process.Start("./DiscordBot");
break;
default:
return;
}
return;
}
switch (args[0])
{
case "-p":
case "-poweroff":
case "-c":
case "-close":
Environment.Exit(0);
break;
case "-cmd":
case "-args":
var cmd = "--args";
if (args.Count > 1)
for (var i = 1; i < args.Count; i++)
cmd += $" {args[i]}";
switch (OS)
{
case OperatingSystem.WINDOWS:
Functions.WriteLogFile("Restarting the bot with the following arguments: \"" + cmd + "\"");
Process.Start("./DiscordBot.exe", cmd);
break;
case OperatingSystem.LINUX:
//case PluginManager.Others.OperatingSystem.MAC_OS: ?? - not tested
Process.Start("./DiscordBot", cmd);
break;
default:
return;
}
Environment.Exit(0);
break;
default:
await context.Channel.SendMessageAsync("Invalid argument. Use `help restart` to see the usage.");
break;
}
}
}

View File

@@ -1,97 +0,0 @@
using System;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager;
using PluginManager.Interfaces;
namespace DiscordBot.Discord.Commands;
internal class Settings : DBCommand
{
/// <summary>
/// Command name
/// </summary>
public string Command => "set";
/// <summary>
/// Command Description
/// </summary>
public string Description => "This command allows you change all settings. Use \"set help\" to show details";
/// <summary>
/// Command usage
/// </summary>
public string Usage => "set [keyword] [new Value]";
/// <summary>
/// Check if the command can be used <inheritdoca DM <see cref="IChannel" />/>
/// </summary>
public bool canUseDM => true;
/// <summary>
/// Check if the command can be used in a server
/// </summary>
public bool canUseServer => true;
/// <summary>
/// Check if the command require administrator to be executed
/// </summary>
public bool requireAdmin => true;
/// <summary>
/// The main body of the command
/// </summary>
/// <param name="context">The command context</param>
/// <param name="message">The command message</param>
/// <param name="client">The discord bot client</param>
/// <param name="isDM">True if the message was sent from a DM channel, false otherwise</param>
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
var channel = message.Channel;
try
{
var content = message.Content;
var data = content.Split(' ');
var keyword = data[1];
if (keyword.ToLower() == "help")
{
await channel.SendMessageAsync("set token [new value] -- set the value of the new token (require restart)");
await channel.SendMessageAsync("set prefix [new value] -- set the value of the new preifx (require restart)");
return;
}
switch (keyword.ToLower())
{
case "token":
if (data.Length != 3)
{
await channel.SendMessageAsync("Invalid token !");
return;
}
Config.SetValue("token", data[2]);
break;
case "prefix":
if (data.Length != 3)
{
await channel.SendMessageAsync("Invalid token !");
return;
}
Config.SetValue("token", data[2]);
break;
default:
return;
}
await channel.SendMessageAsync("Restart required ...");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
await channel.SendMessageAsync("Unknown usage to this command !\nUsage: " + Usage);
}
}
}

View File

@@ -1,139 +0,0 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager;
using static PluginManager.Others.Functions;
namespace DiscordBot.Discord.Core;
internal class Boot
{
/// <summary>
/// The bot prefix
/// </summary>
public readonly string botPrefix;
/// <summary>
/// The bot token
/// </summary>
public readonly string botToken;
/// <summary>
/// The bot client
/// </summary>
public DiscordSocketClient client;
/// <summary>
/// The bot command handler
/// </summary>
private CommandHandler commandServiceHandler;
/// <summary>
/// The command service
/// </summary>
private CommandService service;
/// <summary>
/// The main Boot constructor
/// </summary>
/// <param name="botToken">The bot token</param>
/// <param name="botPrefix">The bot prefix</param>
public Boot(string botToken, string botPrefix)
{
this.botPrefix = botPrefix;
this.botToken = botToken;
}
/// <summary>
/// Checks if the bot is ready
/// </summary>
/// <value> true if the bot is ready, othwerwise false </value>
public bool isReady { get; private set; }
/// <summary>
/// The start method for the bot. This method is used to load the bot
/// </summary>
/// <returns>Task</returns>
public async Task Awake()
{
client = new DiscordSocketClient();
service = new CommandService();
CommonTasks();
await client.LoginAsync(TokenType.Bot, botToken);
await client.StartAsync();
commandServiceHandler = new CommandHandler(client, service, botPrefix);
await commandServiceHandler.InstallCommandsAsync();
await Task.Delay(2000);
while (!isReady) ;
}
private void CommonTasks()
{
if (client == null) return;
client.LoggedOut += Client_LoggedOut;
client.Log += Log;
client.LoggedIn += LoggedIn;
client.Ready += Ready;
}
private Task Client_LoggedOut()
{
WriteLogFile("Successfully Logged Out");
Log(new LogMessage(LogSeverity.Info, "Boot", "Successfully logged out from discord !"));
return Task.CompletedTask;
}
private Task Ready()
{
Console.Title = "ONLINE";
isReady = true;
return Task.CompletedTask;
}
private Task LoggedIn()
{
Console.Title = "CONNECTED";
WriteLogFile("The bot has been logged in at " + DateTime.Now.ToShortDateString() + " (" +
DateTime.Now.ToShortTimeString() + ")"
);
return Task.CompletedTask;
}
private Task Log(LogMessage message)
{
switch (message.Severity)
{
case LogSeverity.Error:
case LogSeverity.Critical:
WriteErrFile(message.Message);
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("[ERROR] " + message.Message);
Console.ForegroundColor = ConsoleColor.White;
break;
case LogSeverity.Info:
case LogSeverity.Debug:
WriteLogFile(message.Message);
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("[INFO] " + message.Message);
Console.ForegroundColor = ConsoleColor.White;
break;
}
return Task.CompletedTask;
}
}

View File

@@ -1,131 +0,0 @@
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Loaders;
using PluginManager.Others;
using PluginManager.Others.Permissions;
namespace DiscordBot.Discord.Core;
internal class CommandHandler
{
private readonly string botPrefix;
private readonly DiscordSocketClient client;
private readonly CommandService commandService;
/// <summary>
/// Command handler constructor
/// </summary>
/// <param name="client">The discord bot client</param>
/// <param name="commandService">The discord bot command service</param>
/// <param name="botPrefix">The prefix to watch for</param>
public CommandHandler(DiscordSocketClient client, CommandService commandService, string botPrefix)
{
this.client = client;
this.commandService = commandService;
this.botPrefix = botPrefix;
}
/// <summary>
/// The method to initialize all commands
/// </summary>
/// <returns></returns>
public async Task InstallCommandsAsync()
{
client.MessageReceived += MessageHandler;
await commandService.AddModulesAsync(Assembly.GetEntryAssembly(), null);
}
/// <summary>
/// The message handler for the bot
/// </summary>
/// <param name="Message">The message got from the user in discord chat</param>
/// <returns></returns>
private async Task MessageHandler(SocketMessage Message)
{
try
{
if (Message as SocketUserMessage == null) return;
var message = Message as SocketUserMessage;
if (message == null) return;
if (!message.Content.StartsWith(botPrefix)) return;
var argPos = 0;
if (message.HasMentionPrefix(client.CurrentUser, ref argPos))
{
await message.Channel.SendMessageAsync("Can not exec mentioned commands !");
return;
}
if (message.Author.IsBot) return;
var context = new SocketCommandContext(client, message);
await commandService.ExecuteAsync(
context,
argPos,
null
);
var plugin = PluginLoader.Commands!.Where(p => p.Command == message.Content.Split(' ')[0].Substring(botPrefix.Length)).FirstOrDefault();
if (plugin != null)
{
if (message.Channel == await message.Author.CreateDMChannelAsync())
{
if (plugin.canUseDM)
{
if (plugin.requireAdmin)
{
if (message.Author.isAdmin())
{
plugin.Execute(context, message, client, true);
Functions.WriteLogFile($"[{message.Author.Id}] Executed command (DM) : " + plugin.Command);
return;
}
await message.Channel.SendMessageAsync("This command is for administrators only !");
return;
}
plugin.Execute(context, message, client, true);
Functions.WriteLogFile($"[{message.Author.Id}] Executed command (DM) : " + plugin.Command);
return;
}
await message.Channel.SendMessageAsync("This command is not for DMs");
return;
}
if (plugin.canUseServer)
{
if (plugin.requireAdmin)
{
if (message.Author.isAdmin())
{
plugin.Execute(context, message, client, false);
Functions.WriteLogFile($"[{message.Author.Id}] Executed command : " + plugin.Command);
return;
}
await message.Channel.SendMessageAsync("This command is for administrators only !");
return;
}
plugin.Execute(context, message, client, false);
Functions.WriteLogFile($"[{message.Author.Id}] Executed command : " + plugin.Command);
}
}
}
catch
{
}
}
}

View File

@@ -1,48 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>disable</Nullable>
<ApplicationIcon />
<StartupObject />
<SignAssembly>False</SignAssembly>
<IsPublishable>True</IsPublishable>
<AssemblyVersion>1.0.0.1</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>none</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Data\**" />
<Compile Remove="obj\**" />
<Compile Remove="Output\**" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="Data\**" />
<EmbeddedResource Remove="obj\**" />
<EmbeddedResource Remove="Output\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Data\**" />
<None Remove="obj\**" />
<None Remove="Output\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Discord.Net" Version="3.7.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PluginManager\PluginManager.csproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>disable</Nullable>
<ApplicationIcon />
<StartupObject />
<SignAssembly>False</SignAssembly>
<IsPublishable>True</IsPublishable>
<AssemblyVersion>1.0.4.0</AssemblyVersion>
<PublishAot>False</PublishAot>
<FileVersion>1.0.4.0</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>none</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Data\**" />
<Compile Remove="obj\**" />
<Compile Remove="Output\**" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="Data\**" />
<EmbeddedResource Remove="obj\**" />
<EmbeddedResource Remove="Output\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Data\**" />
<None Remove="obj\**" />
<None Remove="Output\**" />
<None Remove="builder.bat" />
<None Remove="builder.sh" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.49.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PluginManager\PluginManager.csproj" />
</ItemGroup>
</Project>

53
DiscordBot/Entry.cs Normal file
View File

@@ -0,0 +1,53 @@
using System;
using System.IO;
using System.Reflection;
namespace DiscordBot;
public static class Entry
{
private static readonly string logo = @"
_____ _ _ _____ _ _ ____ _
/ ____| | | | | | __ \(_) | | | _ \ | |
| (___ ___| |_| |__ | | | |_ ___ ___ ___ _ __ __| | | |_) | ___ | |_
\___ \ / _ \ __| '_ \ | | | | / __|/ __/ _ \| '__/ _` | | _ < / _ \| __|
____) | __/ |_| | | | | |__| | \__ \ (_| (_) | | | (_| | | |_) | (_) | |_
|_____/ \___|\__|_| |_| |_____/|_|___/\___\___/|_| \__,_| |____/ \___/ \__|
";
public static void Main(string[] args)
{
#if DEBUG
if (args.Length == 1 && args[0] == "/purge_plugins" )
{
foreach (var plugin in Directory.GetFiles("./Data/Plugins", "*.dll", SearchOption.AllDirectories))
{
File.Delete(plugin);
}
}
#endif
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine(logo);
Console.ResetColor();
var currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += LoadFromSameFolder;
static Assembly LoadFromSameFolder(object sender, ResolveEventArgs args)
{
var folderPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "./Libraries");
var assemblyPath = Path.Combine(folderPath, new AssemblyName(args.Name).Name + ".dll");
if (!File.Exists(assemblyPath)) return null;
var assembly = Assembly.LoadFrom(assemblyPath);
return assembly;
}
Program.Startup(args);
}
}

39
DiscordBot/Installer.cs Normal file
View File

@@ -0,0 +1,39 @@
using System;
using PluginManager;
using System.Threading.Tasks;
using Spectre.Console;
namespace DiscordBot;
public static class Installer
{
private static async Task AskForConfig(string key, string message)
{
var value = AnsiConsole.Ask<string>($"[green]{message}[/]");
if (string.IsNullOrWhiteSpace(value))
{
AnsiConsole.MarkupLine($"Invalid {key} !");
Environment.Exit(-20);
}
Config.AppSettings.Add(key, value);
}
public static async Task GenerateStartupConfig()
{
if(!Config.AppSettings.ContainsKey("token"))
await AskForConfig("token", "Token:");
if(!Config.AppSettings.ContainsKey("prefix"))
await AskForConfig("prefix", "Prefix:");
if(!Config.AppSettings.ContainsKey("ServerID"))
await AskForConfig("ServerID", "Server ID:");
await Config.AppSettings.SaveToFile();
Config.Logger.Log("Config Saved", typeof(Installer));
}
}

View File

@@ -1,336 +1,144 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Runtime.Loader;
using System.Threading;
using System.Threading.Tasks;
using Discord.WebSocket;
using DiscordBot.Discord.Core;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Items;
using PluginManager.Online;
using DiscordBot.Utilities;
using PluginManager.Bot;
using PluginManager.Others;
using PluginManager.Others.Actions;
using Spectre.Console;
using static PluginManager.Config;
namespace DiscordBot;
public class Program
{
private static bool loadPluginsOnStartup;
private static bool listPluginsAtStartup;
public static InternalActionManager internalActionManager;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
[Obsolete]
public static void Main(string[] args)
public static void Startup(string[] args)
{
Directory.CreateDirectory("./Data/Resources");
Directory.CreateDirectory("./Data/Plugins/Commands");
Directory.CreateDirectory("./Data/Plugins/Events");
PreLoadComponents().Wait();
PreLoadComponents(args).Wait();
if (!Config.ContainsKey("token") || Config.GetValue<string>("token") == null || Config.GetValue<string>("token")?.Length != 70)
{
Console.WriteLine("Please insert your token");
Console.Write("Token = ");
var token = Console.ReadLine();
if (token?.Length == 59 || token?.Length == 70)
Config.AddValueToVariables("token", token, true);
else
Console.WriteLine("Invalid token");
if (!AppSettings.ContainsKey("ServerID") || !AppSettings.ContainsKey("token") || !AppSettings.ContainsKey("prefix"))
Installer.GenerateStartupConfig().Wait();
Console.WriteLine("Please insert your prefix (max. 1 character long):");
Console.WriteLine("For a prefix longer then one character, the first character will be saved and the others will be ignored.\n No spaces or numbers allowed");
Console.Write("Prefix = ");
var prefix = Console.ReadLine()![0];
if (prefix == ' ' || char.IsDigit(prefix))
return;
Config.AddValueToVariables("prefix", prefix.ToString(), false);
}
if (!Config.ContainsKey("prefix") || Config.GetValue<string>("prefix") == default)
{
Console.WriteLine("Please insert your prefix (max. 1 character long):");
Console.WriteLine("For a prefix longer then one character, the first character will be saved and the others will be ignored.\n No spaces or numbers allowed");
Console.Write("Prefix = ");
var prefix = Console.ReadLine()![0];
if (prefix == ' ') return;
Config.AddValueToVariables("prefix", prefix.ToString(), false);
}
HandleInput(args).Wait();
HandleInput().Wait();
}
/// <summary>
/// The main loop for the discord bot
/// </summary>
/// <param name="discordbooter">The discord booter used to start the application</param>
private static void NoGUI(Boot discordbooter)
private static void NoGUI()
{
var consoleCommandsHandler = new ConsoleCommandsHandler(discordbooter.client);
if (loadPluginsOnStartup) consoleCommandsHandler.HandleCommand("lp");
if (listPluginsAtStartup) consoleCommandsHandler.HandleCommand("listplugs");
Config.SaveConfig();
internalActionManager.Initialize().Wait();
internalActionManager.Execute("plugin", "load").Wait();
internalActionManager.Refresh().Wait();
while (true)
{
Console.ForegroundColor = ConsoleColor.White;
var cmd = Console.ReadLine();
var args = cmd.Split(' ');
var command = args[0];
args = args.Skip(1).ToArray();
if (args.Length == 0)
args = null;
#if DEBUG
Console_Utilities.WriteColorText("&rSethBot (&yDEBUG&r) &c> ", false);
var cmd = Console.ReadLine();
if (!consoleCommandsHandler.HandleCommand(cmd!, false) && cmd.Length > 0)
Console.WriteLine("Failed to run command " + cmd);
#else
Console_Utilities.WriteColorText("&rSethBot &c> ", false);
var cmd = Console.ReadLine();
if (!consoleCommandsHandler.HandleCommand(cmd!) && cmd.Length > 0)
Console.WriteLine("Failed to run command " + cmd);
#endif
internalActionManager.Execute(command, args).Wait(); // Execute the command
}
}
/// <summary>
/// Start the bot without user interface
/// </summary>
/// <returns>Returns the boot loader for the Discord Bot</returns>
private static async Task<Boot> StartNoGUI()
/// <returns>Returns the bootloader for the Discord Bot</returns>
private static async Task StartNoGui()
{
Console.Clear();
Console.ForegroundColor = ConsoleColor.DarkYellow;
List<string> startupMessageList = await ServerCom.ReadTextFromURL("https://raw.githubusercontent.com/Wizzy69/installer/discord-bot-files/StartupMessage");
AnsiConsole.MarkupLine($"[yellow]Running on version: {AppSettings["Version"]}[/]");
AnsiConsole.MarkupLine("[yellow]Git SethBot: https://github.com/andreitdr/SethDiscordBot [/]");
AnsiConsole.MarkupLine("[yellow]Git Plugins: https://github.com/andreitdr/SethPlugins [/]");
foreach (var message in startupMessageList)
Console.WriteLine(message);
AnsiConsole.MarkupLine("[yellow]Remember to close the bot using the shutdown command ([/][red]exit[/][yellow]) or some settings won't be saved[/]");
AnsiConsole.MarkupLine($"[yellow]Running on [/][magenta]{(OperatingSystem.IsWindows() ? "Windows" : "Linux")}[/]");
Console.WriteLine($"Running on version: {Config.GetValue<string>("Version") ?? System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()}");
Console.WriteLine($"Git URL: {Config.GetValue<string>("GitURL") ?? " Could not find Git URL"}");
Console_Utilities.WriteColorText("&rRemember to close the bot using the ShutDown command (&ysd&r) or some settings won't be saved\n");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine($"============================ LOG ============================");
AnsiConsole.MarkupLine("[yellow]===== Seth Discord Bot =====[/]");
try
{
var token = Config.GetValue<string>("token");
#if DEBUG
Console.WriteLine("Starting in DEBUG MODE");
if (!Directory.Exists("./Data/BetaTest"))
Console.WriteLine("Failed to start in debug mode because the folder ./Data/BetaTest does not exist");
else
{
token = File.ReadAllText("./Data/BetaTest/token.txt");
//Debug mode code...
}
#endif
var prefix = Config.GetValue<string>("prefix");
var token = AppSettings["token"];
var prefix = AppSettings["prefix"];
var discordbooter = new Boot(token, prefix);
await discordbooter.Awake();
return discordbooter;
}
catch (Exception ex)
{
Console.WriteLine(ex);
return null;
Logger.Log(ex.ToString(), typeof(Program), LogType.CRITICAL);
}
}
/// <summary>
/// Clear folder
/// </summary>
/// <param name="d">Directory path</param>
private static Task ClearFolder(string d)
{
var files = Directory.GetFiles(d);
var fileNumb = files.Length;
for (var i = 0; i < fileNumb; i++)
{
File.Delete(files[i]);
Console.WriteLine("Deleting : " + files[i]);
}
return Task.CompletedTask;
}
/// <summary>
/// Handle user input arguments from the startup of the application
/// </summary>
/// <param name="args">The arguments</param>
private static async Task HandleInput(string[] args)
private static async Task HandleInput()
{
var len = args.Length;
if (len == 3 && args[0] == "/download")
await StartNoGui();
try
{
var url = args[1];
var location = args[2];
await ServerCom.DownloadFileAsync(url, location);
return;
internalActionManager = new InternalActionManager(AppSettings["PluginFolder"], "*.dll");
NoGUI();
}
if (len > 0 && (args.Contains("--cmd") || args.Contains("--args") || args.Contains("--nomessage")))
catch (IOException ex)
{
if (args.Contains("lp") || args.Contains("loadplugins"))
loadPluginsOnStartup = true;
if (args.Contains("listplugs"))
listPluginsAtStartup = true;
len = 0;
}
if (len == 0 || (args[0] != "--exec" && args[0] != "--execute"))
{
var b = await StartNoGUI();
Thread mainThread = new Thread(() => NoGUI(b));
mainThread.Start();
return;
}
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine("Execute command interface noGUI\n\n");
Console.WriteLine(
"\tCommand name\t\t\t\tDescription\n" +
"-- help | -help\t\t ------ \tDisplay the help message\n" +
"--reset-full\t\t ------ \tReset all files (clear files)\n" +
"--reset-logs\t\t ------ \tClear up the output folder\n" +
"--start\t\t ------ \tStart the bot\n" +
"exit\t\t\t ------ \tClose the application"
);
while (true)
{
Console.ForegroundColor = ConsoleColor.White;
Console.Write("> ");
var message = Console.ReadLine().Split(' ');
switch (message[0])
if (ex.Message == "No process is on the other end of the pipe." || (uint)ex.HResult == 0x800700E9)
{
case "--help":
case "-help":
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine("\tCommand name\t\t\t\tDescription\n" + "-- help | -help\t\t ------ \tDisplay the help message\n" + "--reset-full\t\t ------ \tReset all files (clear files)\n" + "--reset-settings\t ------ \tReset only bot settings\n" + "--reset-logs\t\t ------ \tClear up the output folder\n" + "--start\t\t ------ \tStart the bot\n" + "exit\t\t\t ------ \tClose the application");
break;
case "--reset-full":
await ClearFolder("./Data/Resources/");
await ClearFolder("./Output/Logs/");
await ClearFolder("./Output/Errors");
await ClearFolder("./Data/Languages/");
await ClearFolder("./Data/Plugins/Commands");
await ClearFolder("./Data/Plugins/Events");
Console.WriteLine("Successfully cleared all folders");
break;
case "--reset-logs":
await ClearFolder("./Output/Logs");
await ClearFolder("./Output/Errors");
Console.WriteLine("Successfully cleard logs folder");
break;
case "--exit":
case "exit":
Environment.Exit(0);
break;
default:
Console.WriteLine("Failed to execute command " + message[0]);
break;
Logger.Log("An error occured while closing the bot last time. Please consider closing the bot using the &rexit&c method !\n" +
"There is a risk of losing all data or corruption of the save file, which in some cases requires to reinstall the bot !",
typeof(Program), LogType.ERROR
);
}
}
}
private static async Task PreLoadComponents()
private static async Task PreLoadComponents(string[] args)
{
await Config.LoadConfig();
if (Config.ContainsKey("DeleteLogsAtStartup"))
if (Config.GetValue<bool>("DeleteLogsAtStartup"))
foreach (var file in Directory.GetFiles("./Output/Logs/"))
File.Delete(file);
List<string> OnlineDefaultKeys = await ServerCom.ReadTextFromURL("https://raw.githubusercontent.com/Wizzy69/installer/discord-bot-files/SetupKeys");
await Initialize();
Config.PluginConfig.Load();
AppSettings["Version"] = Assembly.GetExecutingAssembly().GetName().Version.ToString();
if (!Config.ContainsKey("Version"))
Config.AddValueToVariables("Version", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), false);
else
Config.SetValue("Version", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString());
PluginManager.Updater.Application.AppUpdater updater = new();
var update = await updater.CheckForUpdates();
foreach (var key in OnlineDefaultKeys)
if (update != PluginManager.Updater.Application.Update.None)
{
if (key.Length <= 3 || !key.Contains(' ')) continue;
string[] s = key.Split(' ');
try
{
if (Config.ContainsKey(s[0])) Config.SetValue(s[0], s[1]);
else Config.GetAndAddValueToVariable(s[0], s[1], s[2].Equals("true", StringComparison.CurrentCultureIgnoreCase));
}
catch (Exception ex)
{
Functions.WriteErrFile(ex.Message);
}
Console.WriteLine($"New update available: {update.UpdateVersion}");
Console.WriteLine($"Download link: {update.UpdateUrl}");
Console.WriteLine($"Update notes: {update.UpdateNotes}\n\n");
Environment.Exit(0);
}
List<string> onlineSettingsList = await ServerCom.ReadTextFromURL("https://raw.githubusercontent.com/Wizzy69/installer/discord-bot-files/OnlineData");
foreach (var key in onlineSettingsList)
Logger.OnLog += (sender, logMessage) =>
{
if (key.Length <= 3 || !key.Contains(' ')) continue;
string[] s = key.Split(' ');
switch (s[0])
var messageColor = logMessage.Type switch
{
case "CurrentVersion":
string newVersion = s[1];
if (!newVersion.Equals(Config.GetValue<string>("Version")))
{
Console.WriteLine("A new version has been released on github page.");
Console.WriteLine("Download the new version using the following link wrote in yellow");
Console_Utilities.WriteColorText("&y" + Config.GetValue<string>("GitURL") + "&c");
LogType.INFO => "[green]",
LogType.WARNING => "[yellow]",
LogType.ERROR => "[red]",
LogType.CRITICAL => "[red]",
_ => "[white]"
};
Console.WriteLine();
Console.WriteLine("Your product will work just fine on this outdated version, but an update is recommended.\n" +
"From now on, this version is no longer supported"
);
Console_Utilities.WriteColorText("&rUse at your own risk&c");
Console_Utilities.WriteColorText("&mCurrent Version: " + Config.GetValue<string>("Version") + "&c");
Console_Utilities.WriteColorText("&gNew Version: " + newVersion + "&c");
Console.WriteLine("\n\n");
await Task.Delay(1000);
int waitTime = 20; //wait time to proceed
Console.Write($"The bot will start in {waitTime} seconds");
while (waitTime > 0)
{
await Task.Delay(1000);
waitTime--;
Console.SetCursorPosition("The bot will start in ".Length, Console.CursorTop);
Console.Write(" ");
Console.SetCursorPosition("The bot will start in ".Length, Console.CursorTop);
Console.Write(waitTime + " seconds");
}
}
break;
if (logMessage.Message.Contains('['))
{
Console.WriteLine(logMessage.Message);
return;
}
}
Console_Utilities.Initialize();
Config.SaveConfig();
AnsiConsole.MarkupLine($"{messageColor}{logMessage.ThrowTime} {logMessage.Message} [/]");
};
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Spectre.Console;
namespace DiscordBot.Utilities;
public static class ConsoleUtilities
{
public static async Task<T> ExecuteWithProgressBar<T>(Task<T> function, string message)
{
T result = default;
await AnsiConsole.Progress()
.AutoClear(true)
.Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn())
.StartAsync(
async ctx =>
{
var task = ctx.AddTask(message);
task.IsIndeterminate = true;
result = await function;
task.Increment(100);
}
);
return result;
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Threading.Tasks;
using PluginManager.Others;
using Spectre.Console;
using Spectre.Console.Rendering;
namespace DiscordBot.Utilities
{
public class TableData
{
public List<string> Columns;
public List<OneOf<string, IRenderable>[]> Rows;
public TableData()
{
Columns = new List<string>();
Rows = new List<OneOf<string, IRenderable>[]>();
}
public TableData(List<string> columns)
{
Columns = columns;
Rows = new List<OneOf<string, IRenderable>[]>();
}
public bool IsEmpty => Rows.Count == 0;
public bool HasRoundBorders { get; set; } = true;
public bool DisplayLinesBetweenRows { get; set; } = false;
public void AddRow(OneOf<string, IRenderable>[] row)
{
Rows.Add(row);
}
public void PrintTable()
{
var table = new Table();
table.Border(this.HasRoundBorders ? TableBorder.Rounded : TableBorder.Square);
table.AddColumns(this.Columns.ToArray());
table.ShowRowSeparators = DisplayLinesBetweenRows;
foreach (var row in this.Rows)
{
table.AddRow(row.Select(element => element.Match(
(data) => new Markup(data),
(data) => data
)));
}
AnsiConsole.Write(table);
}
}
}

35
DiscordBot/builder.bat Normal file
View File

@@ -0,0 +1,35 @@
@echo off
echo "Building..."
echo "Building linux-x64 not self-contained"
dotnet publish -r linux-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ../publish/linux-x64
echo "Building win-x64 not self-contained"
dotnet publish -r win-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ../publish/win-x64
echo "Building osx-x64 not self-contained"
dotnet publish -r osx-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ../publish/osx-x64
echo "Building linux-x64 self-contained"
dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ../publish/linux-x64-selfcontained
echo "Building win-x64 self-contained"
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ../publish/win-x64-selfcontained
echo "Building osx-x64 self-contained"
dotnet publish -r osx-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ../publish/osx-x64-selfcontained
echo "Zipping..."
mkdir ../publish/zip
zip -r ../publish/zip/linux-x64.zip ../publish/linux-x64
zip -r ../publish/zip/win-x64.zip ../publish/win-x64
zip -r ../publish/zip/osx-x64.zip ../publish/osx-x64
zip -r ../publish/zip/linux-x64-selfcontained.zip ../publish/linux-x64-selfcontained
zip -r ../publish/zip/win-x64-selfcontained.zip ../publish/win-x64-selfcontained
zip -r ../publish/zip/osx-x64-selfcontained.zip ../publish/osx-x64-selfcontained
echo "Done!"

36
DiscordBot/builder.sh Normal file
View File

@@ -0,0 +1,36 @@
# All files in this directory will be copied to the root of the container
echo "Building..."
echo "Building linux-x64 not self-contained"
dotnet publish -r linux-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ./publish/linux-x64
echo "Building win-x64 not self-contained"
dotnet publish -r win-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ./publish/win-x64
echo "Building osx-x64 not self-contained"
dotnet publish -r osx-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ./publish/osx-x64
#One file per platform
echo "Building linux-x64 self-contained"
dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ./publish/linux-x64-selfcontained
echo "Building win-x64 self-contained"
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ./publish/win-x64-selfcontained
echo "Building osx-x64 self-contained"
dotnet publish -r osx-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ./publish/osx-x64-selfcontained
echo "Zipping..."
mkdir ./publish/zip
zip -r ./publish/zip/linux-x64.zip ./publish/linux-x64
zip -r ./publish/zip/win-x64.zip ./publish/win-x64
zip -r ./publish/zip/osx-x64.zip ./publish/osx-x64
zip -r ./publish/zip/linux-x64-selfcontained.zip ./publish/linux-x64-selfcontained
zip -r ./publish/zip/win-x64-selfcontained.zip ./publish/win-x64-selfcontained
zip -r ./publish/zip/osx-x64-selfcontained.zip ./publish/osx-x64-selfcontained
echo "Done!"

454
DiscordBotUI/.gitignore vendored Normal file
View File

@@ -0,0 +1,454 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

View File

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects.
One for Windows with net8.0-windows TFM, one for MacOS with net8.0-macos and one with net8.0 TFM for Linux.-->
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DiscordBotUI\DiscordBotUI.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,25 @@
using System;
using Avalonia;
using Avalonia.ReactiveUI;
namespace DiscordBotUI.Desktop
{
internal sealed class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.UseReactiveUI();
}
}

View File

@@ -0,0 +1,11 @@
{
"profiles": {
"DiscordBotUI.Desktop": {
"commandName": "Project"
},
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
}
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- This manifest is used on Windows only.
Don't remove it as it might cause problems with window transparency and embedded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="DiscordBotUI.Desktop"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>

View File

@@ -0,0 +1,35 @@
@echo off
echo "Building..."
echo "Building linux-x64 not self-contained"
dotnet publish -r linux-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ../publish/linux-x64
echo "Building win-x64 not self-contained"
dotnet publish -r win-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ../publish/win-x64
echo "Building osx-x64 not self-contained"
dotnet publish -r osx-x64 -p:PublishSingleFile=false --self-contained true -c Release -o ../publish/osx-x64
echo "Building linux-x64 self-contained"
dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ../publish/linux-x64-selfcontained
echo "Building win-x64 self-contained"
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ../publish/win-x64-selfcontained
echo "Building osx-x64 self-contained"
dotnet publish -r osx-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ../publish/osx-x64-selfcontained
echo "Zipping..."
mkdir ../publish/zip
zip -r ../publish/zip/linux-x64.zip ../publish/linux-x64
zip -r ../publish/zip/win-x64.zip ../publish/win-x64
zip -r ../publish/zip/osx-x64.zip ../publish/osx-x64
zip -r ../publish/zip/linux-x64-selfcontained.zip ../publish/linux-x64-selfcontained
zip -r ../publish/zip/win-x64-selfcontained.zip ../publish/win-x64-selfcontained
zip -r ../publish/zip/osx-x64-selfcontained.zip ../publish/osx-x64-selfcontained
echo "Done!"

View File

@@ -0,0 +1,17 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:DiscordBotUI"
x:Class="DiscordBotUI.App"
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<Application.DataTemplates>
<local:ViewLocator/>
</Application.DataTemplates>
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
</Application.Styles>
</Application>

View File

@@ -0,0 +1,31 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using DiscordBotUI.ViewModels;
using DiscordBotUI.Views;
namespace DiscordBotUI
{
public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new HomePage();
}
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
{
singleViewPlatform.MainView = new HomePage();
}
base.OnFrameworkInitializationCompleted();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

View File

@@ -0,0 +1,90 @@
using System.Collections.Generic;
using Discord;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Loaders;
using PluginManager.Others;
namespace DiscordBotUI.Bot.Commands;
/// <summary>
/// The help command
/// </summary>
internal class Help: DBCommand
{
/// <summary>
/// Command name
/// </summary>
public string Command => "help";
public List<string> Aliases => null;
/// <summary>
/// Command Description
/// </summary>
public string Description => "This command allows you to check all loaded commands";
/// <summary>
/// Command usage
/// </summary>
public string Usage => "help <command>";
/// <summary>
/// Check if the command require administrator to be executed
/// </summary>
public bool requireAdmin => false;
/// <summary>
/// The main body of the command
/// </summary>
/// <param name="context">The command context</param>
public void ExecuteServer(DbCommandExecutingArguments args)
{
if (args.arguments is not null)
{
var e = GenerateHelpCommand(args.arguments[0]);
if (e is null)
args.context.Channel.SendMessageAsync("Unknown Command " + args.arguments[0]);
else
args.context.Channel.SendMessageAsync(embed: e.Build());
return;
}
var embedBuilder = new EmbedBuilder();
var adminCommands = "";
var normalCommands = "";
foreach (var cmd in PluginLoader.Commands)
if (cmd.requireAdmin)
adminCommands += cmd.Command + " ";
else
normalCommands += cmd.Command + " ";
if (adminCommands.Length > 0)
embedBuilder.AddField("Admin Commands", adminCommands);
if (normalCommands.Length > 0)
embedBuilder.AddField("Normal Commands", normalCommands);
args.context.Channel.SendMessageAsync(embed: embedBuilder.Build());
}
private EmbedBuilder GenerateHelpCommand(string command)
{
var embedBuilder = new EmbedBuilder();
var cmd = PluginLoader.Commands.Find(p => p.Command == command ||
p.Aliases is not null && p.Aliases.Contains(command)
);
if (cmd == null) return null;
embedBuilder.AddField("Usage", Config.AppSettings["prefix"] + cmd.Usage);
embedBuilder.AddField("Description", cmd.Description);
if (cmd.Aliases is null)
return embedBuilder;
embedBuilder.AddField("Alias", cmd.Aliases.Count == 0 ? "-" : string.Join(", ", cmd.Aliases));
return embedBuilder;
}
}

View File

@@ -0,0 +1,83 @@
using System.Threading.Tasks;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Loaders;
using PluginManager.Others;
namespace DiscordBotUI.Bot
{
internal class DiscordBot
{
private readonly string[] _StartArguments;
public DiscordBot(string[] args)
{
this._StartArguments = args;
}
public async Task InitializeBot()
{
string token = Config.AppSettings["token"];
string prefix = Config.AppSettings["prefix"];
PluginManager.Bot.Boot discordBooter = new PluginManager.Bot.Boot(token, prefix);
await discordBooter.Awake();
}
public async Task LoadPlugins()
{
var loader = new PluginLoader(Config.DiscordBot.Client);
loader.OnCommandLoaded += (data) =>
{
if (data.IsSuccess)
{
Config.Logger.Log("Successfully loaded command : " + data.PluginName, typeof(ICommandAction),
LogType.INFO
);
}
else
{
Config.Logger.Log("Failed to load command : " + data.PluginName + " because " + data.ErrorMessage,
typeof(ICommandAction), LogType.ERROR
);
}
};
loader.OnEventLoaded += (data) =>
{
if (data.IsSuccess)
{
Config.Logger.Log("Successfully loaded event : " + data.PluginName, typeof(ICommandAction),
LogType.INFO
);
}
else
{
Config.Logger.Log("Failed to load event : " + data.PluginName + " because " + data.ErrorMessage,
typeof(ICommandAction), LogType.ERROR
);
}
};
loader.OnSlashCommandLoaded += (data) =>
{
if (data.IsSuccess)
{
Config.Logger.Log("Successfully loaded slash command : " + data.PluginName, typeof(ICommandAction),
LogType.INFO
);
}
else
{
Config.Logger.Log("Failed to load slash command : " + data.PluginName + " because " + data.ErrorMessage,
typeof(ICommandAction), LogType.ERROR
);
}
};
await loader.LoadPlugins();
}
}
}

View File

@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.10" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.10" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.10" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.10" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\PluginManager\PluginManager.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,33 @@
using System;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using DiscordBotUI.ViewModels;
namespace DiscordBotUI
{
public class ViewLocator : IDataTemplate
{
public Control? Build(object? data)
{
if (data is null)
return null;
var name = data.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal);
var type = Type.GetType(name);
if (type != null)
{
return (Control)Activator.CreateInstance(type)!;
}
return new TextBlock { Text = "Not Found: " + name };
}
public bool Match(object? data)
{
return data is ViewModelBase;
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DiscordBotUI.ViewModels
{
public class OnlinePlugin
{
public string Name { get; set; }
public string Description { get; set; }
public string Version { get; set; }
public OnlinePlugin(string name, string description, string version) {
Name = name;
Description = description;
Version = version;
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DiscordBotUI.ViewModels
{
public class Plugin
{
public string Name { get; set; }
public string Version { get; set; }
public bool IsMarkedToUninstall { get; set; }
public Plugin(string Name, string Version, bool isMarkedToUninstall)
{
this.Name = Name;
this.Version = Version;
IsMarkedToUninstall = isMarkedToUninstall;
}
}
}

View File

@@ -0,0 +1,11 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using ReactiveUI;
namespace DiscordBotUI.ViewModels
{
public class ViewModelBase : ReactiveObject
{
}
}

View File

@@ -0,0 +1,41 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="DiscordBotUI.Views.HomePage"
Title="HomePage" MinWidth="900" MinHeight="500">
<DockPanel LastChildFill="True">
<Menu DockPanel.Dock="Top">
<MenuItem Header="Settings" Click="SettingsMenuClick"></MenuItem>
<MenuItem Header="Installed Plugins" Click="PluginsMenuClick"></MenuItem>
<MenuItem Header="New Plugins" Click="NewPluginsMenuClick"></MenuItem>
</Menu>
<Border Width="500" BorderBrush="Black" BorderThickness="1" DockPanel.Dock="Right">
<RelativePanel Margin="10">
<Label Content="Bot Token: " Name="labelToken" RelativePanel.AlignTopWithPanel="True"/>
<TextBox Name="textBoxToken" Text="" IsReadOnly="True" RelativePanel.AlignRightWithPanel="True" Width="350" />
<Label Content="Bot Prefix: " Name="labelPrefix" RelativePanel.Below="labelToken" Margin="0,20,0,0"/>
<TextBox Name="textBoxPrefix" Text="" RelativePanel.AlignRightWithPanel="True" RelativePanel.Below="textBoxToken"
IsReadOnly="True" Margin="0,10,0,0" Width="350" />
<Label Content="Server Id: " Name="labelServerId" RelativePanel.Below="labelPrefix" Margin="0,20,0,0"/>
<TextBox Name="textBoxServerId" Text="" RelativePanel.AlignRightWithPanel="True"
IsReadOnly="True" RelativePanel.Below="textBoxPrefix" Margin="0,10,0,0" Width="350" />
<Button Click="ButtonStartBotClick" Name="buttonStartBot" Content="Start" RelativePanel.AlignBottomWithPanel="True" Margin="0,-100,0,0"
Width="120" Height="40" Background="#FF008CFF" Foreground="White" BorderThickness="0" CornerRadius="5" FontWeight="Bold"
RelativePanel.AlignHorizontalCenterWithPanel="True" />
</RelativePanel>
</Border>
<Border Background="White" BorderBrush="Black" BorderThickness="1">
<TextBlock Name="logTextBlock" Foreground="Black" Text="" />
</Border>
</DockPanel>
</Window>

View File

@@ -0,0 +1,80 @@
using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Threading;
using DiscordBotUI.Bot;
using PluginManager;
using PluginManager.Others.Logger;
namespace DiscordBotUI.Views;
public partial class HomePage : Window
{
private readonly DiscordBot _DiscordBot;
public HomePage()
{
InitializeComponent();
_DiscordBot = new DiscordBot(null!);
Loaded += HomePage_Loaded;
}
private async void HomePage_Loaded(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
await Config.Initialize();
if(!Config.AppSettings.ContainsAllKeys("token", "prefix"))
{
await new SettingsPage().ShowDialog(this);
if (string.IsNullOrWhiteSpace(Config.AppSettings["token"]) || string.IsNullOrWhiteSpace(Config.AppSettings["prefix"]))
Environment.Exit(-1);
}
textBoxToken.Text = Config.AppSettings["token"];
textBoxPrefix.Text = Config.AppSettings["prefix"];
textBoxServerId.Text = Config.AppSettings["ServerID"];
}
private void SetTextToTB(Log logMessage)
{
logTextBlock.Text += $"[{logMessage.Type}] [{logMessage.ThrowTime.ToShortTimeString()}] {logMessage.Message}\n";
}
private async void ButtonStartBotClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
Config.Logger.OnLog += async (sender, logMessage) =>
{
await Dispatcher.UIThread.InvokeAsync(() => SetTextToTB(logMessage), DispatcherPriority.Background);
};
await _DiscordBot.InitializeBot();
await _DiscordBot.LoadPlugins();
}
private async void SettingsMenuClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
//await new SettingsPage().ShowDialog(this);
new SettingsPage().Show();
}
private async void PluginsMenuClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
//await new PluginsPage().ShowDialog(this);
new PluginsPage().Show();
}
private void NewPluginsMenuClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
new PluginInstaller().Show();
}
}

View File

@@ -0,0 +1,33 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:DiscordBotUI.Views;assembly=DiscordBotUI"
xmlns:viewmodels="using:DiscordBotUI.ViewModels"
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="300"
x:Class="DiscordBotUI.Views.PluginInstaller"
x:DataType="views:PluginInstaller"
Title="PluginInstaller"
Name="PluginInstallerWindow"
>
<DataGrid Name="dataGridInstallablePlugins" ItemsSource="{Binding Plugins}">
<DataGrid.Columns>
<DataGridTextColumn Header="Plugin Name" Foreground="Aquamarine" Binding="{Binding Name}"/>
<DataGridTextColumn Header="Plugin Version" Binding="{Binding Version}"/>
<DataGridTextColumn Header="Plugin Description" Binding="{Binding Description}" Width="*"/>
<DataGridTemplateColumn Header="Download">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="viewmodels:OnlinePlugin">
<Button Content="Download"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Command="{Binding InstallPlugin, RelativeSource={RelativeSource AncestorType=views:PluginInstaller}}"
CommandParameter="{Binding Name}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Window>

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Input;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml.Templates;
using Avalonia.Media;
using DiscordBotUI.ViewModels;
using PluginManager;
using PluginManager.Plugin;
namespace DiscordBotUI.Views;
public partial class PluginInstaller : Window
{
public ObservableCollection<OnlinePlugin> Plugins { get; private set; }
public PluginInstaller()
{
InitializeComponent();
Loaded += OnPageLoaded;
}
private async void OnPageLoaded(object? sender, RoutedEventArgs e)
{
if (Config.PluginsManager is null) return;
List<PluginOnlineInfo>? onlineInfos = await Config.PluginsManager.GetPluginsList();
if(onlineInfos is null) return;
List<OnlinePlugin> plugins = new List<OnlinePlugin>();
foreach(PluginOnlineInfo onlinePlugin in onlineInfos)
{
plugins.Add(new OnlinePlugin(onlinePlugin.Name, onlinePlugin.Description, onlinePlugin.Version.ToShortString()));
}
Plugins = new ObservableCollection<OnlinePlugin>(plugins);
dataGridInstallablePlugins.ItemsSource = Plugins;
}
public async void InstallPlugin(string name)
{
PluginOnlineInfo? info = await Config.PluginsManager.GetPluginDataByName(name);
if(info is null) return;
await Config.PluginsManager.InstallPlugin(info, null);
}
}

View File

@@ -0,0 +1,25 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
xmlns:model ="clr-namespace:DiscordBotUI.Views;assembly=DiscordBotUI"
x:Class="DiscordBotUI.Views.PluginsPage"
Title="Plugins Page"
x:DataType="model:PluginsPage">
<DataGrid Name="dataGridPlugins" Margin="20" ItemsSource="{Binding Plugins}"
IsReadOnly="False"
CanUserSortColumns="False"
GridLinesVisibility="All"
AutoGenerateColumns="False"
BorderThickness="1" BorderBrush="Gray">
<DataGrid.Columns>
<DataGridTextColumn Header="Plugin Name" Foreground="Aquamarine" Binding="{Binding Name}"/>
<DataGridTextColumn Header="Plugin Version" Binding="{Binding Version}"/>
<DataGridCheckBoxColumn Header="Is Marked for Uninstall" Binding="{Binding IsMarkedToUninstall}"/>
</DataGrid.Columns>
</DataGrid>
</Window>

View File

@@ -0,0 +1,43 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Avalonia.Controls;
using Avalonia.Interactivity;
using DiscordBotUI.ViewModels;
using PluginManager;
namespace DiscordBotUI.Views;
public partial class PluginsPage: Window
{
public ObservableCollection<Plugin> Plugins { get; private set; }
public PluginsPage()
{
InitializeComponent();
Loaded += OnPageLoaded;
}
private async void OnPageLoaded(object? sender, RoutedEventArgs e)
{
if (Config.PluginsManager is null) return;
var plugins = await Config.PluginsManager.GetInstalledPlugins();
var localList = new List<Plugin>();
foreach (var plugin in plugins)
{
localList.Add(new Plugin(plugin.PluginName, plugin.PluginVersion.ToShortString(), plugin.IsMarkedToUninstall));
}
Plugins = new ObservableCollection<Plugin>(localList);
dataGridPlugins.ItemsSource = Plugins;
}
}

View File

@@ -0,0 +1,26 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="200"
x:Class="DiscordBotUI.Views.SettingsPage"
Title="SettingsPage" Width="500" Height="200" MinWidth="500" MaxWidth="500" MinHeight="200" MaxHeight="200">
<RelativePanel Margin="10,10,10,0">
<Label Content="Bot Token: " Name="labelToken" RelativePanel.AlignTopWithPanel="True"/>
<TextBox Name="textBoxToken" Text="" IsReadOnly="False" RelativePanel.AlignRightWithPanel="True" Width="350" />
<Label Content="Bot Prefix: " Name="labelPrefix" RelativePanel.Below="labelToken" Margin="0,20,0,0"/>
<TextBox Name="textBoxPrefix" Text="" RelativePanel.AlignRightWithPanel="True" RelativePanel.Below="textBoxToken"
IsReadOnly="False" Margin="0,10,0,0" Width="350" />
<Label Content="Server Id: " Name="labelServerId" RelativePanel.Below="labelPrefix" Margin="0,20,0,0"/>
<TextBox Name="textBoxServerId" Text="" RelativePanel.AlignRightWithPanel="True"
IsReadOnly="False" RelativePanel.Below="textBoxPrefix" Margin="0,10,0,0" Width="350" />
<Label Name="labelErrorMessage" Foreground="Red" RelativePanel.Below="textBoxServerId" />
<Button Name="buttonSaveSettings" Click="ButtonSaveSettingsClick" Content="Save" RelativePanel.AlignBottomWithPanel="True" Margin="0,-50,0,0"
Width="120" Height="40" Background="#FF008CFF" Foreground="White" BorderThickness="0" CornerRadius="5" FontWeight="Bold"
RelativePanel.AlignHorizontalCenterWithPanel="True" />
</RelativePanel>
</Window>

View File

@@ -0,0 +1,44 @@
using Avalonia.Controls;
using PluginManager;
namespace DiscordBotUI.Views;
public partial class SettingsPage : Window
{
public SettingsPage()
{
InitializeComponent();
}
private async void ButtonSaveSettingsClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
string token = textBoxToken.Text;
string botPrefix = textBoxPrefix.Text;
string serverId = textBoxServerId.Text;
if (string.IsNullOrWhiteSpace(serverId)) serverId = string.Empty;
if (string.IsNullOrWhiteSpace(token))
{
labelErrorMessage.Content = "The token is invalid";
return;
}
if(string.IsNullOrWhiteSpace(botPrefix) || botPrefix.Length > 1 || botPrefix.Length < 1)
{
labelErrorMessage.Content = "The prefix is invalid";
return;
}
Config.AppSettings.Add("token", token);
Config.AppSettings.Add("prefix", botPrefix);
Config.AppSettings.Add("ServerID", serverId);
await Config.AppSettings.SaveToFile();
Config.Logger.Log("Config Saved");
Close();
}
}

View File

@@ -1,20 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath></BaseOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Remove="bin\**" />
<EmbeddedResource Remove="bin\**" />
<None Remove="bin\**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PluginManager\PluginManager.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,57 +0,0 @@
using Discord;
using Discord.WebSocket;
using EVE_LevelingSystem.LevelingSystemCore;
using PluginManager;
using PluginManager.Interfaces;
using PluginManager.Others;
namespace EVE_LevelingSystem
{
internal class Level : DBEvent
{
public string name => "Leveling System Event Handler";
public string description => "The Leveling System Event Handler";
internal static Settings globalSettings = new();
public async void Start(DiscordSocketClient client)
{
Directory.CreateDirectory("./Data/Resources/LevelingSystem");
if (!Config.ContainsKey("LevelingSystemPath"))
Config.AddValueToVariables("LevelingSystemPath", "./Data/Resources/LevelingSystem", true);
if (!Config.ContainsKey("LevelingSystemSettingsFile"))
Config.AddValueToVariables("LevelingSystemSettingsFile", "./Data/Resources/LevelingSystemSettings.txt", true);
//PluginManager.Config.AddValueToVariables
if (!File.Exists(Config.GetValue<string>("LevelingSystemSettingsFile")))
{
globalSettings = new Settings { TimeToWaitBetweenMessages = 5 };
await Functions.SaveToJsonFile<Settings>(Config.GetValue<string>("LevelingSystemSettingsFile"), globalSettings);
}
else
globalSettings = await Functions.ConvertFromJson<Settings>(Config.GetValue<string>("LevelingSystemSettingsFile"));
// Console.WriteLine(globalSettings.TimeToWaitBetweenMessages);
client.MessageReceived += ClientOnMessageReceived;
}
private async Task ClientOnMessageReceived(SocketMessage arg)
{
if (arg.Author.IsBot || arg.IsTTS || arg.Content.StartsWith(Config.GetValue<string>("prefix"))) return;
string userID = arg.Author.Id.ToString();
User user;
if (File.Exists($"{Config.GetValue<string>("LevelingSystemPath")}/{userID}.dat"))
{
user = await Functions.ConvertFromJson<User>(Config.GetValue<string>("LevelingSystemPath")! + $"/{userID}.dat");
// Console.WriteLine(Config.GetValue("LevelingSystemPath"));
if (user.AddEXP()) await arg.Channel.SendMessageAsync($"{arg.Author.Mention} is now level {user.CurrentLevel}");
await Functions.SaveToJsonFile(Config.GetValue<string>("LevelingSystemPath") + $"/{userID}.dat", user);
return;
}
user = new User { CurrentEXP = 0, CurrentLevel = 1, RequiredEXPToLevelUp = LevelCalculator.GetNextLevelRequiredEXP(1), user = new DiscordUser { DiscordTag = arg.Author.DiscriminatorValue, userID = arg.Author.Id, Username = arg.Author.Username } };
if (user.AddEXP()) await arg.Channel.SendMessageAsync($"{arg.Author.Mention} is now level {user.CurrentLevel}");
await Functions.SaveToJsonFile<User>($"{Config.GetValue<string>("LevelingSystemPath")}/{userID}.dat", user);
}
}
}

View File

@@ -1,57 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PluginManager;
namespace EVE_LevelingSystem.LevelingSystemCore
{
internal static class LevelCalculator
{
internal static List<string> OnWaitingList = new();
internal static Int64 GetNextLevelRequiredEXP(int currentLevel)
{
return currentLevel * 8 + 24;
}
internal static void LevelUp(this User user)
{
user.CurrentEXP = 0;
user.RequiredEXPToLevelUp = GetNextLevelRequiredEXP(user.CurrentLevel);
user.CurrentLevel++;
}
internal static bool AddEXP(this User user)
{
if (OnWaitingList.Contains(user.user.userID.ToString())) return false;
Random r = new Random();
int exp = r.Next(2, 12);
Int64 userXP = user.CurrentEXP;
Int64 reqEXP = user.RequiredEXPToLevelUp;
if (userXP + exp >= reqEXP)
{
user.LevelUp();
user.CurrentEXP = exp - (reqEXP - userXP);
Console.WriteLine("Level up");
return true;
}
user.CurrentEXP += exp;
OnWaitingList.Add(user.user.userID.ToString());
new Thread(() =>
{
int minutesToWait = Level.globalSettings.TimeToWaitBetweenMessages;
Thread.Sleep(60000 * minutesToWait);
OnWaitingList.Remove(user.user.userID.ToString());
}
);
return false;
}
}
}

View File

@@ -1,20 +0,0 @@
using Discord;
using Discord.WebSocket;
namespace EVE_LevelingSystem.LevelingSystemCore
{
public class DiscordUser
{
public string Username { get; set; }
public ushort DiscordTag { get; set; }
public ulong userID { get; set; }
}
public class User
{
public DiscordUser user { get; set; }
public int CurrentLevel { get; set; }
public long CurrentEXP { get; set; }
public long RequiredEXPToLevelUp { get; set; }
}
}

View File

@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EVE_LevelingSystem
{
public class Settings
{
public int TimeToWaitBetweenMessages { get; set; }
}
}

View File

@@ -1,34 +0,0 @@
using AngleSharp.Dom;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MusicCommands
{
internal class AudioFile
{
internal string Name { get; set; }
internal string Url { get; set; }
internal AudioFile(string name, string url)
{
Name = name;
Url = url;
}
internal async Task DownloadAudioFile()
{
Process proc = new Process();
proc.StartInfo.FileName = "MusicDownloader.exe";
proc.StartInfo.Arguments = $"{Url},{Name}";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
await proc.WaitForExitAsync();
}
}
}

View File

@@ -1,13 +0,0 @@
using Discord;
using Discord.Audio;
namespace MusicCommands;
internal static class Data
{
internal static IAudioClient audioClient = null;
internal static IVoiceChannel voiceChannel = null;
internal static MusicPlayer MusicPlayer = null;
internal static MusicPlaylist Playlist = new();
}

View File

@@ -1,41 +0,0 @@
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
namespace MusicCommands;
internal class Leave : DBCommand
{
public string Command => "leave";
public string Description => "Leave the voice channel";
public string Usage => "leave";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
if (Data.audioClient is not null && Data.voiceChannel is not null)
{
await Data.audioClient.StopAsync();
await Data.voiceChannel.DisconnectAsync();
}
if (Data.Playlist is not null)
{
Data.Playlist.ClearQueue();
Data.Playlist = new();
}
if (Data.MusicPlayer is not null)
{
Data.MusicPlayer.Stop();
Data.MusicPlayer = null;
}
}
}

View File

@@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>warnings</Nullable>
<BaseOutputPath>bin\</BaseOutputPath>
<AssemblyName>Music Commands</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>../BUILDS/</OutputPath>
<ErrorReport>none</ErrorReport>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PluginManager\PluginManager.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="YoutubeExplode" Version="6.2.0" />
</ItemGroup>
</Project>

View File

@@ -1,51 +0,0 @@
using System.IO;
using System.Threading.Tasks;
namespace MusicCommands;
internal class MusicPlayer
{
private Stream outputStream { get; }
internal bool isPlaying, isPaused;
public MusicPlayer(Stream outputChannel)
{
outputStream = outputChannel;
}
public async Task Play(Stream source, int byteSize)
{
isPlaying = true;
while (isPlaying)
{
if (isPaused)
continue;
var bits = new byte[byteSize];
var read = await source.ReadAsync(bits, 0, byteSize);
if (read == 0)
break;
try
{
await outputStream.WriteAsync(bits, 0, read);
}
catch
{
break;
}
}
await source.FlushAsync();
await source.DisposeAsync();
source.Close();
await outputStream.FlushAsync();
isPlaying = false;
}
public void Stop()
{
isPlaying = false;
}
}

View File

@@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MusicCommands
{
internal class MusicPlaylist
{
internal MusicPlaylist()
{
Console.WriteLine("Initialized playlist.");
}
public Queue<AudioFile> QueueList = new();
public void Enqueue(AudioFile query) => QueueList.Enqueue(query);
public void ClearQueue() => QueueList.Clear();
public int Count => QueueList.Count;
public AudioFile GetNextSong => QueueList.Dequeue();
public AudioFile WhatIsNext => QueueList.Peek();
}
}

View File

@@ -1,25 +0,0 @@
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
namespace MusicCommands;
internal class Pause : DBCommand
{
public string Command => "pause";
public string Description => "Pause/Unpause the music that is currently running";
public string Usage => "pause";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => false;
public void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
Data.MusicPlayer.isPaused = !Data.MusicPlayer.isPaused;
}
}

View File

@@ -1,117 +0,0 @@
using System;
using System.Diagnostics;
using System.IO;
using Discord;
using Discord.Audio;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
using PluginManager.Others;
namespace MusicCommands;
internal class Play : DBCommand
{
public string Command => "play";
public string Description => "Play music from a file";
public string Usage => "play [name/url]";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
Directory.CreateDirectory("Music");
var path = "./Music/";
string[] splitted = message.Content.Split(' ');
if (splitted.Length < 2)
return;
do
{
if (splitted.Length == 2 && splitted[1].Contains("youtube.com") || splitted[1].Contains("youtu.be"))
{
var url = splitted[1];
path += $"{Functions.CreateMD5(url)}";
if (File.Exists(path))
{
Data.Playlist.Enqueue(new AudioFile(path, null));
}
else
{
var file = new AudioFile(path, url);
await file.DownloadAudioFile();
Data.Playlist.Enqueue(file);
}
}
else
{
var searchString = splitted.MergeStrings(1);
path += $"{Functions.CreateMD5(searchString)}";
if (File.Exists(path))
{
Data.Playlist.Enqueue(new AudioFile(path, null));
}
else
{
await context.Channel.SendMessageAsync("Searching for " + searchString);
var file = new AudioFile(path, searchString);
await file.DownloadAudioFile();
Data.Playlist.Enqueue(file);
if (Data.MusicPlayer is null)
await context.Channel.SendMessageAsync("Playing: " + searchString);
}
}
if (Data.MusicPlayer is not null)
{
await context.Channel.SendMessageAsync("Enqueued your request");
return;
}
}
while (false);
Data.voiceChannel = (context.User as IGuildUser)?.VoiceChannel;
if (Data.voiceChannel == null)
{
await context.Channel.SendMessageAsync("User must be in a voice channel, or a voice channel must be passed as an argument.");
return;
}
if (Data.audioClient is null)
{
Data.audioClient = await Data.voiceChannel.ConnectAsync(true);
Data.MusicPlayer = null;
}
using (var discordChanneAudioOutStream = Data.audioClient.CreatePCMStream(AudioApplication.Mixed))
{
if (Data.MusicPlayer is null)
Data.MusicPlayer = new MusicPlayer(discordChanneAudioOutStream);
while (Data.Playlist.Count > 0)
{
var nowPlaying = Data.Playlist.GetNextSong;
using (var ffmpeg = CreateStream(nowPlaying.Name))
using (var ffmpegOutputBaseStream = ffmpeg.StandardOutput.BaseStream)
{
await Data.MusicPlayer.Play(ffmpegOutputBaseStream, 1024);
Console.WriteLine("Finished playing from " + nowPlaying.Url);
}
}
Data.MusicPlayer = null;
}
}
private Process CreateStream(string path)
{
return Process.Start(new ProcessStartInfo { FileName = "ffmpeg", Arguments = $"-hide_banner -loglevel panic -i \"{path}\" -ac 2 -f s16le -ar 48000 pipe:1", UseShellExecute = false, RedirectStandardOutput = true });
}
}

View File

@@ -1,31 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
namespace MusicCommands
{
public class Skip : DBCommand
{
public string Command => "skip";
public string Description => "skip the music that is currently running";
public string Usage => "skip";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => false;
public void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
Data.MusicPlayer.isPlaying = false;
}
}
}

View File

@@ -1,31 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Interfaces;
namespace MusicCommands
{
public class queue : DBCommand
{
public string Command => "queue";
public string Description => "check queue";
public string Usage => "queue";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
await context.Channel.SendMessageAsync($"You have {Data.Playlist.Count} items in queue");
}
}
}

153
PluginManager/Bot/Boot.cs Normal file
View File

@@ -0,0 +1,153 @@
using System;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Others;
namespace PluginManager.Bot;
public class Boot
{
/// <summary>
/// The bot prefix
/// </summary>
public readonly string BotPrefix;
/// <summary>
/// The bot token
/// </summary>
public readonly string BotToken;
/// <summary>
/// The bot client
/// </summary>
public DiscordSocketClient Client;
/// <summary>
/// The bot command handler
/// </summary>
private CommandHandler _commandServiceHandler;
/// <summary>
/// The command service
/// </summary>
private CommandService _service;
/// <summary>
/// The main Boot constructor
/// </summary>
/// <param name="botToken">The bot token</param>
/// <param name="botPrefix">The bot prefix</param>
public Boot(string botToken, string botPrefix)
{
this.BotPrefix = botPrefix;
this.BotToken = botToken;
}
/// <summary>
/// Checks if the bot is ready
/// </summary>
/// <value> true if the bot is ready, otherwise false </value>
public bool IsReady { get; private set; }
/// <summary>
/// The start method for the bot. This method is used to load the bot
/// </summary>
/// <param name="config">
/// The discord socket config. If null then the default one will be applied (AlwaysDownloadUsers=true,
/// UseInteractionSnowflakeDate=false, GatewayIntents=GatewayIntents.All)
/// </param>
/// <returns>Task</returns>
public async Task Awake(DiscordSocketConfig? config = null)
{
if (config is null)
config = new DiscordSocketConfig
{
AlwaysDownloadUsers = true,
//Disable system clock checkup (for responses at slash commands)
UseInteractionSnowflakeDate = false,
GatewayIntents = GatewayIntents.All
};
Client = new DiscordSocketClient(config);
_service = new CommandService();
CommonTasks();
await Client.LoginAsync(TokenType.Bot, BotToken);
await Client.StartAsync();
_commandServiceHandler = new CommandHandler(Client, _service, BotPrefix);
await _commandServiceHandler.InstallCommandsAsync();
Config.DiscordBotClient = this;
while (!IsReady) ;
}
private void CommonTasks()
{
if (Client == null) return;
Client.LoggedOut += Client_LoggedOut;
Client.Log += Log;
Client.LoggedIn += LoggedIn;
Client.Ready += Ready;
Client.Disconnected += Client_Disconnected;
}
private async Task Client_Disconnected(Exception arg)
{
if (arg.Message.Contains("401"))
{
Config.AppSettings.Remove("token");
Config.Logger.Log("The token is invalid. Please restart the bot and follow the instructions", typeof(Boot), LogType.CRITICAL);
await Config.AppSettings.SaveToFile();
Environment.Exit(0);
}
}
private async Task Client_LoggedOut()
{
Config.Logger.Log("Successfully Logged Out", typeof(Boot));
await Log(new LogMessage(LogSeverity.Info, "Boot", "Successfully logged out from discord !"));
}
private Task Ready()
{
IsReady = true;
return Task.CompletedTask;
}
private Task LoggedIn()
{
Config.Logger.Log("Successfully Logged In", typeof(Boot));
return Task.CompletedTask;
}
private Task Log(LogMessage message)
{
switch (message.Severity)
{
case LogSeverity.Error:
case LogSeverity.Critical:
Config.Logger.Log(message.Message, typeof(Boot), LogType.ERROR);
break;
case LogSeverity.Info:
case LogSeverity.Debug:
Config.Logger.Log(message.Message, typeof(Boot), LogType.INFO);
break;
}
return Task.CompletedTask;
}
}

Some files were not shown because too many files have changed in this diff Show More