Skip to content

Commit

Permalink
update hook url discord
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Mar 7, 2024
1 parent e9ac970 commit 49c965c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions APSToolkit/Utils/DiscordWebhook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ namespace APSToolkit.Utils;

public class DiscordWebhook
{
private string WebHookUrl { get; set; } =
"https://discordapp.com/api/webhooks/1182501348734943272/2xI-zV7JGQjatZgBC8w1-SKTZlHxg5-hnvDfza8qi5OK-842K2RuZRtbAE2A7zH5VCld";
public string username { get; set; }
public string avatar_url { get; set; }
public string content { get; set; }

public void SendReport(string title, string content)
public void SendReport(string webHookUrl,string title, string content)
{
string url = WebHookUrl;
var client = new RestClient(url);
var client = new RestClient(webHookUrl);
var request = new RestRequest() {Method = Method.Post};
DiscordWebhook discordWebhook = new DiscordWebhook()
{
Expand All @@ -25,6 +22,5 @@ public void SendReport(string title, string content)
// add raw content json with {content: "{content}"}'
request.AddJsonBody(discordWebhook);
client.ExecuteAsync(request);
Console.WriteLine("Done report to discord");
}
}
2 changes: 1 addition & 1 deletion APSToolkitPython/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name="aps-toolkit",
version="0.2.9",
version="0.3.0",
author="chuong mep",
author_email="[email protected]",
description="A Toolkit Autodesk Platform Services for Python",
Expand Down

0 comments on commit 49c965c

Please sign in to comment.