vassago/Models/Message.cs

35 lines
1016 B
C#
Raw Normal View History

2023-06-01 00:03:23 -04:00
namespace vassago.Models;
using System;
2023-06-01 00:03:23 -04:00
using System.Collections.Generic;
2023-06-05 14:55:48 -04:00
using System.ComponentModel.DataAnnotations.Schema;
using System.Reflection;
2023-06-01 00:03:23 -04:00
using System.Threading.Tasks;
using Discord.WebSocket;
2023-06-01 00:03:23 -04:00
public class Message
{
2023-06-05 14:55:48 -04:00
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
2023-06-01 00:03:23 -04:00
public Guid Id { get; set; }
public ulong? ExternalId { get; set; }
public string Content { get; set; }
2023-06-19 01:14:04 -04:00
/*
* TODO: more general "talking to me". current impl is platform's capital m Mention, but I'd like it if they use my name without "properly"
* mentioning me, and also if it's just me and them in a channel
*/
2023-06-01 00:03:23 -04:00
public bool MentionsMe { get; set; }
public DateTimeOffset Timestamp { get; set; }
public bool ActedOn { get; set; }
2023-06-05 14:55:48 -04:00
public List<Attachment> Attachments { get; set; }
2023-06-01 00:03:23 -04:00
public User Author { get; set; }
public Channel Channel { get; set; }
2023-06-05 14:55:48 -04:00
[NonSerialized]
public Func<string, Task> Reply;
[NonSerialized]
public Func<string, Task> React;
2023-06-01 00:03:23 -04:00
}