Adds role specific channels.
Read ME update Updating tile of role will update revelant channels and roles. Added command examples. Fixese leaks
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace EventBot.Entities
|
||||
{
|
||||
@@ -15,6 +16,8 @@ namespace EventBot.Entities
|
||||
public string Description { get; set; }
|
||||
public string Emote { get; set; }
|
||||
public int MaxParticipants { get; set; }
|
||||
public ulong ChannelId { get; set; }
|
||||
public ulong RoleId { get; set; }
|
||||
public int EventId { get; set; }
|
||||
[ForeignKey("EventId")]
|
||||
public virtual Event Event { get; set; }
|
||||
@@ -22,6 +25,8 @@ namespace EventBot.Entities
|
||||
public int ParticipantCount => Participants == null ? 0 : Participants.Count;
|
||||
public int ReamainingOpenings => MaxParticipants < 0 ? 1 : MaxParticipants - ParticipantCount;
|
||||
|
||||
public string ChannelName => Regex.Replace(Title.Replace(' ', '-'), "(?!\\w)", "");
|
||||
|
||||
public int SortNumber
|
||||
{
|
||||
get
|
||||
|
@@ -12,6 +12,7 @@ namespace EventBot.Entities
|
||||
public string Prefix { get; set; }
|
||||
public ulong EventRoleConfirmationChannelId { get; set; }
|
||||
public ulong ParticipantRoleId { get; set; }
|
||||
public ulong AutoRoleChannelCategoryId { get; set; }
|
||||
public virtual ICollection<Event> Events { get; set; }
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user