Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.0.0 #53

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Source/Cake.Discord.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ VisualStudioVersion = 15.0.26730.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Discord", "Cake.Discord\Cake.Discord.csproj", "{501A58C8-962C-4140-A4A6-34B7AA22B188}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{961B08A4-C3E9-4E80-A5F8-3B0CC64BCDE9}"
ProjectSection(SolutionItems) = preProject
Cake.Discord.ruleset = Cake.Discord.ruleset
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion Source/Cake.Discord/Cake.Discord.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net46;netstandard2.0;net5.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
Expand Down
2 changes: 1 addition & 1 deletion Source/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<CakeVersion>0.33.0</CakeVersion>
<CakeVersion>1.0.0</CakeVersion>
</PropertyGroup>
</Project>
17 changes: 0 additions & 17 deletions Source/SolutionInfo.cs

This file was deleted.

19 changes: 13 additions & 6 deletions Source/Cake.Discord/discord.cake → demo/dsl/discord.cake
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
//#r "bin/Release/netstandard2.0/Cake.Discord.dll"
#addin "nuget:https://www.nuget.org/api/v2?package=Cake.Discord&version=0.1.0"
#r "../../Source/Cake.Discord/bin/Debug/netstandard2.0/Cake.Discord.dll"
//#addin "nuget:https://www.nuget.org/api/v2?package=Cake.Discord"

var url = Argument<string>("url", null);

if (string.IsNullOrEmpty(url))
{
Error("you need to pass a webhook url via `--url=...`");
return;
}

try
{
Information("This is a 'normal' message...");

var postMessageResult = Discord.Chat.PostMessage(
webHookUrl:"https://discordapp.com/api/webhooks/491746448291921920/vhj3a4thXNZldKXdcoJQfDrfkD-hHZVYbGC6hnR58c0yB1erFDfJ8KWU5dyFD-t12RKP",
webHookUrl:url,
content:"This is a normal message."
);

Expand All @@ -30,7 +37,7 @@ try
Information("This is a 'tts' message...");

var postMessageResult = Discord.Chat.PostMessage(
webHookUrl:"https://discordapp.com/api/webhooks/491746448291921920/vhj3a4thXNZldKXdcoJQfDrfkD-hHZVYbGC6hnR58c0yB1erFDfJ8KWU5dyFD-t12RKP",
webHookUrl:url,
content:"This is a TTS message.",
messageSettings:new DiscordChatMessageSettings { Tts = true }
);
Expand All @@ -54,7 +61,7 @@ try
Information("This is a custom avatar and name message...");

var postMessageResult = Discord.Chat.PostMessage(
webHookUrl:"https://discordapp.com/api/webhooks/491746448291921920/vhj3a4thXNZldKXdcoJQfDrfkD-hHZVYbGC6hnR58c0yB1erFDfJ8KWU5dyFD-t12RKP",
webHookUrl:url,
content:"This is a custom avatar and name message.",
messageSettings:new DiscordChatMessageSettings {
UserName = "gep13",
Expand All @@ -81,7 +88,7 @@ try
Information("This is a message with custom formatting...");

var postMessageResult = Discord.Chat.PostMessage(
webHookUrl:"https://discordapp.com/api/webhooks/491746448291921920/vhj3a4thXNZldKXdcoJQfDrfkD-hHZVYbGC6hnR58c0yB1erFDfJ8KWU5dyFD-t12RKP",
webHookUrl:url,
content:"This _is_ a `message` with custom formatting from *CakeBuild* using incoming web hook:thumbsup:\r\n```Here is some code```"
);

Expand Down
Loading