diff options
| author | Michael <[email protected]> | 2017-05-25 15:26:24 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-25 15:26:24 -0400 |
| commit | de6d1d15ab2f2f770efdb894eac5f1ce683af3fd (patch) | |
| tree | 419e0d034f7be82d38fdba5dac2b0f41e3571735 /Project-Unite | |
| parent | 3f1236f22eda41e4d7e869d5e7da3802e7419a26 (diff) | |
| download | project-unite-de6d1d15ab2f2f770efdb894eac5f1ce683af3fd.tar.gz project-unite-de6d1d15ab2f2f770efdb894eac5f1ce683af3fd.tar.bz2 project-unite-de6d1d15ab2f2f770efdb894eac5f1ce683af3fd.zip | |
send webhook when a contest opens
Diffstat (limited to 'Project-Unite')
| -rw-r--r-- | Project-Unite/Controllers/ContestsController.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Project-Unite/Controllers/ContestsController.cs b/Project-Unite/Controllers/ContestsController.cs index bb60013..5653751 100644 --- a/Project-Unite/Controllers/ContestsController.cs +++ b/Project-Unite/Controllers/ContestsController.cs @@ -276,6 +276,13 @@ namespace Project_Unite.Controllers db.Contests.Add(c); db.SaveChanges(); + + NotificationDaemon.ScreamToDiscord( + "A new contest has started.", + $@"Contest name: {c.Name} +Ends at: {c.EndsAt}", + Url.Action("ViewContest", new { id = c.Id }) + ); NotificationDaemon.NotifyEveryone(User.Identity.GetUserId(), "A contest has just started.", "A new contest has been open! Contest: " + c.Name, Url.Action("ViewContest", new { id = c.Id })); return RedirectToAction("ViewContest", new { id = c.Id }); |
