Skip to content

Commit

Permalink
Improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
h3xb0y committed Oct 13, 2021
1 parent 39a0a48 commit ae94c6d
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 82 deletions.
82 changes: 82 additions & 0 deletions Model/Model.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace SlackThrowReaction.Model
{
public sealed class SlashCommandPayload
{
[JsonProperty("token")] public string Token { get; set; }

[JsonProperty("team_id")] public string TeamId { get; set; }

[JsonProperty("team_domain")] public string TeamDomain { get; set; }

[JsonProperty("channel_id")] public string ChannelId { get; set; }

[JsonProperty("channel_name")] public string ChannelName { get; set; }

[JsonProperty("user_id")] public string UserId { get; set; }

[JsonProperty("user_name")] public string UserName { get; set; }

[JsonProperty("command")] public string Command { get; set; }

[JsonProperty("text")] public string Text { get; set; }

[JsonProperty("response_url")] public string ResponseUrl { get; set; }
}

public sealed class SlashActionPayload
{
[JsonProperty("type")] public string Type { get; set; }

[JsonProperty("token")] public string Token { get; set; }

[JsonProperty("response_url")] public string ResponseUrl { get; set; }

[JsonProperty("actions")] public Action[] Actions { get; set; }
}

public sealed class Action
{
[JsonProperty("action_id")] public string ActionId { get; set; }

[JsonProperty("block_id")] public string BlockId { get; set; }

[JsonProperty("value")] public string Value { get; set; }
}

public sealed class SlackReply
{
[JsonProperty("response_type")] public string ResponseType;

[JsonProperty("text")] public string Text { get; set; }

[JsonProperty("attachments")] public Attachment[] Attachments { get; set; }
}

public sealed class Attachment
{
[JsonProperty("mrkdwn_in")] public string[] Mrkdwn_in { get; set; } = {"text"};

[JsonProperty("image_url")] public string Url { get; set; }

[JsonProperty("thumb_url")] public string ThumbUrl { get; set; }

[JsonProperty("text")] public string Text { get; set; }

[JsonProperty("unfurl_media")] public bool UnfurlMedia { get; set; } = true;

[JsonProperty("unfurl_links")] public bool UnfurlLinks { get; set; } = false;
}

public class EmojiInfo
{
[JsonProperty("id")] public string Id { get; set; }

[JsonProperty("code")] public string Code { get; set; }

[JsonProperty("imageType")] public string ImageType { get; set; }
}
}
82 changes: 0 additions & 82 deletions Model/asd.cs

This file was deleted.

2 changes: 2 additions & 0 deletions SlackThrowReaction.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/PencilsConfiguration/ActualSeverity/@EntryValue">INFO</s:String></wpf:ResourceDictionary>

0 comments on commit ae94c6d

Please sign in to comment.