commit 79214d1c752249cc3aeefdd89c83b3767f38bc39 Author: Paulo Date: Sat May 29 12:40:44 2021 -0300 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..1ff0c4230 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..654370842 --- /dev/null +++ b/.gitignore @@ -0,0 +1,208 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studo 2015 cache/options directory +.vs/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# 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 +# TODO: 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 + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.[Cc]ache +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +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 + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +#Custom +project.lock.json +/test/Discord.Net.Tests/config.json +/test/Discord.Net.Tests/cache.db* +/docs/_build +*.pyc +/.editorconfig +.vscode/ +docs/api/\.manifest + +\.idea/ + +# Codealike UID +codealike.json diff --git a/Discord.Net.sln b/Discord.Net.sln new file mode 100644 index 000000000..61590a972 --- /dev/null +++ b/Discord.Net.sln @@ -0,0 +1,52 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31229.75 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord.Net.Core", "src\Discord.Net.Core\Discord.Net.Core.csproj", "{4E7A2251-D582-4093-95A5-2FF450DCCD3F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Implementations", "Implementations", "{ADF3F58A-948A-4ABC-B5AA-07271B341695}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Discord.Net.Rest", "src\Discord.Net.Rest\Discord.Net.Rest.csproj", "{009A57F3-3BF2-4B28-8A61-CEA8108EB8B8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Discord.Net.WebSocket", "src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj", "{857DD396-D71D-4E85-B83B-F26599B2FB76}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{7EE9C2BE-991C-4CA8-9FD3-5DAE26D911E2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord.Net.Tests.Unit", "Discord.Net.Tests.Unit\Discord.Net.Tests.Unit.csproj", "{C5C8DDD7-2D52-451B-9954-AFE64F6D3196}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4E7A2251-D582-4093-95A5-2FF450DCCD3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E7A2251-D582-4093-95A5-2FF450DCCD3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E7A2251-D582-4093-95A5-2FF450DCCD3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E7A2251-D582-4093-95A5-2FF450DCCD3F}.Release|Any CPU.Build.0 = Release|Any CPU + {009A57F3-3BF2-4B28-8A61-CEA8108EB8B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {009A57F3-3BF2-4B28-8A61-CEA8108EB8B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {009A57F3-3BF2-4B28-8A61-CEA8108EB8B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {009A57F3-3BF2-4B28-8A61-CEA8108EB8B8}.Release|Any CPU.Build.0 = Release|Any CPU + {857DD396-D71D-4E85-B83B-F26599B2FB76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {857DD396-D71D-4E85-B83B-F26599B2FB76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {857DD396-D71D-4E85-B83B-F26599B2FB76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {857DD396-D71D-4E85-B83B-F26599B2FB76}.Release|Any CPU.Build.0 = Release|Any CPU + {C5C8DDD7-2D52-451B-9954-AFE64F6D3196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5C8DDD7-2D52-451B-9954-AFE64F6D3196}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5C8DDD7-2D52-451B-9954-AFE64F6D3196}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5C8DDD7-2D52-451B-9954-AFE64F6D3196}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {009A57F3-3BF2-4B28-8A61-CEA8108EB8B8} = {ADF3F58A-948A-4ABC-B5AA-07271B341695} + {857DD396-D71D-4E85-B83B-F26599B2FB76} = {ADF3F58A-948A-4ABC-B5AA-07271B341695} + {C5C8DDD7-2D52-451B-9954-AFE64F6D3196} = {7EE9C2BE-991C-4CA8-9FD3-5DAE26D911E2} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B7EDDAFF-0E67-4853-B8BB-49134E9950D7} + EndGlobalSection +EndGlobal diff --git a/Discord.Net.targets b/Discord.Net.targets new file mode 100644 index 000000000..5fe1cfa79 --- /dev/null +++ b/Discord.Net.targets @@ -0,0 +1,27 @@ + + + 3.0.0 + alpha + latest + Discord.Net Contributors + discord;discordapp + https://github.com/discord-net/Discord.Net + http://opensource.org/licenses/MIT + https://github.com/discord-net/Discord.Net/raw/3.0/docs/marketing/logo/PackageLogo.png + git + git://github.com/discord-net/Discord.Net + + + $(VersionSuffix)-alpha + alpha + + + $(VersionSuffix)-$(BuildNumber) + build-$(BuildNumber) + + + $(NoWarn);CS1573;CS1591 + true + true + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..fb9480169 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015-2021 Discord.Net Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/README.md b/README.md new file mode 100644 index 000000000..f59ace47a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Discord.Net + +An unofficial .NET API Wrapper for the Discord client (https://discord.com). diff --git a/StyleAnalyzer.targets b/StyleAnalyzer.targets new file mode 100644 index 000000000..9e2760de6 --- /dev/null +++ b/StyleAnalyzer.targets @@ -0,0 +1,9 @@ + + + + + + + true + + diff --git a/src/Discord.Net.Core/Discord.Net.Core.csproj b/src/Discord.Net.Core/Discord.Net.Core.csproj new file mode 100644 index 000000000..838587d00 --- /dev/null +++ b/src/Discord.Net.Core/Discord.Net.Core.csproj @@ -0,0 +1,10 @@ + + + + + Discord.Net.Core + Discord + The core components for the Discord.Net library. + netstandard2.1 + + diff --git a/src/Discord.Net.Rest/Discord.Net.Rest.csproj b/src/Discord.Net.Rest/Discord.Net.Rest.csproj new file mode 100644 index 000000000..d3f99fa84 --- /dev/null +++ b/src/Discord.Net.Rest/Discord.Net.Rest.csproj @@ -0,0 +1,13 @@ + + + + + Discord.Net.Rest + Discord.Rest + A core Discord.Net library containing the REST client and models. + netstandard2.1 + + + + + diff --git a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj new file mode 100644 index 000000000..95d03dd3c --- /dev/null +++ b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj @@ -0,0 +1,14 @@ + + + + + Discord.Net.WebSocket + Discord.WebSocket + A core Discord.Net library containing the WebSocket client and models. + netstandard2.1 + + + + + + diff --git a/src/Discord.Net/Discord.Net.nuspec b/src/Discord.Net/Discord.Net.nuspec new file mode 100644 index 000000000..5ec6873de --- /dev/null +++ b/src/Discord.Net/Discord.Net.nuspec @@ -0,0 +1,27 @@ + + + + Discord.Net + 3.0.0-alpha$suffix$ + Discord.Net + Discord.Net Contributors + An asynchronous API wrapper for Discord. This metapackage includes all of the optional Discord.Net components. + discord;discordapp + https://github.com/discord-net/Discord.Net + http://opensource.org/licenses/MIT + false + https://github.com/discord-net/Discord.Net/raw/dev/docs/marketing/logo/PackageLogo.png + + + + + + + + + + + + + + diff --git a/stylecop.json b/stylecop.json new file mode 100644 index 000000000..bb9056963 --- /dev/null +++ b/stylecop.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": { + "indentation": { + "indentationSize": 4, + "tabSize": 4, + "useTabs": false + }, + "documentationRules": { + "documentExposedElements": true, + "documentInternalElements": false, + "documentPrivateElements": false, + "documentInterfaces": true, + "documentPrivateFields": true, + "xmlHeader": false, + "documentationCulture": "en-US" + } + } +} diff --git a/tests/Discord.Net.Tests.Unit/Discord.Net.Tests.Unit.csproj b/tests/Discord.Net.Tests.Unit/Discord.Net.Tests.Unit.csproj new file mode 100644 index 000000000..29393af47 --- /dev/null +++ b/tests/Discord.Net.Tests.Unit/Discord.Net.Tests.Unit.csproj @@ -0,0 +1,21 @@ + + + + netcoreapp3.1 + + false + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + +