mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-05 00:54:27 -05:00
Global usings and file scoped namespaces
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace NadekoBot.Modules.Utility.Common
|
||||
namespace NadekoBot.Modules.Utility.Common;
|
||||
|
||||
[DebuggerDisplay("Type: {UnitType} Trigger: {Triggers[0]} Mod: {Modifier}")]
|
||||
public class ConvertUnit
|
||||
{
|
||||
[DebuggerDisplay("Type: {UnitType} Trigger: {Triggers[0]} Mod: {Modifier}")]
|
||||
public class ConvertUnit
|
||||
{
|
||||
public string[] Triggers { get; set; }
|
||||
public string UnitType { get; set; }
|
||||
public decimal Modifier { get; set; }
|
||||
}
|
||||
}
|
||||
public string[] Triggers { get; set; }
|
||||
public string UnitType { get; set; }
|
||||
public decimal Modifier { get; set; }
|
||||
}
|
||||
@@ -1,19 +1,16 @@
|
||||
using System;
|
||||
namespace NadekoBot.Modules.Utility.Common.Exceptions;
|
||||
|
||||
namespace NadekoBot.Modules.Utility.Common.Exceptions
|
||||
public class StreamRoleNotFoundException : Exception
|
||||
{
|
||||
public class StreamRoleNotFoundException : Exception
|
||||
public StreamRoleNotFoundException() : base("Stream role wasn't found.")
|
||||
{
|
||||
public StreamRoleNotFoundException() : base("Stream role wasn't found.")
|
||||
{
|
||||
}
|
||||
|
||||
public StreamRoleNotFoundException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public StreamRoleNotFoundException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public StreamRoleNotFoundException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public StreamRoleNotFoundException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,16 @@
|
||||
using System;
|
||||
namespace NadekoBot.Modules.Utility.Common.Exceptions;
|
||||
|
||||
namespace NadekoBot.Modules.Utility.Common.Exceptions
|
||||
public class StreamRolePermissionException : Exception
|
||||
{
|
||||
public class StreamRolePermissionException : Exception
|
||||
public StreamRolePermissionException() : base("Stream role was unable to be applied.")
|
||||
{
|
||||
public StreamRolePermissionException() : base("Stream role was unable to be applied.")
|
||||
{
|
||||
}
|
||||
|
||||
public StreamRolePermissionException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public StreamRolePermissionException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public StreamRolePermissionException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public StreamRolePermissionException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,134 +1,131 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NadekoBot.Modules.Utility.Common.Patreon
|
||||
namespace NadekoBot.Modules.Utility.Common.Patreon;
|
||||
|
||||
public sealed class Attributes
|
||||
{
|
||||
public sealed class Attributes
|
||||
{
|
||||
[JsonPropertyName("full_name")]
|
||||
public string FullName { get; set; }
|
||||
[JsonPropertyName("full_name")]
|
||||
public string FullName { get; set; }
|
||||
|
||||
[JsonPropertyName("is_follower")]
|
||||
public bool IsFollower { get; set; }
|
||||
[JsonPropertyName("is_follower")]
|
||||
public bool IsFollower { get; set; }
|
||||
|
||||
[JsonPropertyName("last_charge_date")]
|
||||
public DateTime LastChargeDate { get; set; }
|
||||
[JsonPropertyName("last_charge_date")]
|
||||
public DateTime LastChargeDate { get; set; }
|
||||
|
||||
[JsonPropertyName("last_charge_status")]
|
||||
public string LastChargeStatus { get; set; }
|
||||
[JsonPropertyName("last_charge_status")]
|
||||
public string LastChargeStatus { get; set; }
|
||||
|
||||
[JsonPropertyName("lifetime_support_cents")]
|
||||
public int LifetimeSupportCents { get; set; }
|
||||
[JsonPropertyName("lifetime_support_cents")]
|
||||
public int LifetimeSupportCents { get; set; }
|
||||
|
||||
[JsonPropertyName("currently_entitled_amount_cents")]
|
||||
public int CurrentlyEntitledAmountCents { get; set; }
|
||||
[JsonPropertyName("currently_entitled_amount_cents")]
|
||||
public int CurrentlyEntitledAmountCents { get; set; }
|
||||
|
||||
[JsonPropertyName("patron_status")]
|
||||
public string PatronStatus { get; set; }
|
||||
}
|
||||
|
||||
public sealed class Data
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public sealed class Address
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public Data Data { get; set; }
|
||||
}
|
||||
|
||||
// public sealed class CurrentlyEntitledTiers
|
||||
// {
|
||||
// [JsonPropertyName("data")]
|
||||
// public List<Datum> Data { get; set; }
|
||||
// }
|
||||
|
||||
// public sealed class Relationships
|
||||
// {
|
||||
// [JsonPropertyName("address")]
|
||||
// public Address Address { get; set; }
|
||||
//
|
||||
// // [JsonPropertyName("currently_entitled_tiers")]
|
||||
// // public CurrentlyEntitledTiers CurrentlyEntitledTiers { get; set; }
|
||||
// }
|
||||
|
||||
public sealed class PatreonResponse
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public List<PatreonMember> Data { get; set; }
|
||||
|
||||
[JsonPropertyName("included")]
|
||||
public List<PatreonUser> Included { get; set; }
|
||||
|
||||
[JsonPropertyName("links")]
|
||||
public PatreonLinks Links { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonLinks
|
||||
{
|
||||
[JsonPropertyName("next")]
|
||||
public string Next { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonUser
|
||||
{
|
||||
[JsonPropertyName("attributes")]
|
||||
public PatreonUserAttributes Attributes { get; set; }
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
// public string Type { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonUserAttributes
|
||||
{
|
||||
[JsonPropertyName("social_connections")]
|
||||
public PatreonSocials SocialConnections { get; set; }
|
||||
}
|
||||
public sealed class PatreonSocials
|
||||
{
|
||||
[JsonPropertyName("discord")]
|
||||
public DiscordSocial Discord { get; set; }
|
||||
}
|
||||
|
||||
public sealed class DiscordSocial
|
||||
{
|
||||
[JsonPropertyName("user_id")]
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonMember
|
||||
{
|
||||
[JsonPropertyName("attributes")]
|
||||
public Attributes Attributes { get; set; }
|
||||
|
||||
[JsonPropertyName("relationships")]
|
||||
public Relationships Relationships { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public sealed class Relationships
|
||||
{
|
||||
[JsonPropertyName("user")]
|
||||
public PatreonRelationshipUser User { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonRelationshipUser
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public PatreonUserData Data { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonUserData
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
[JsonPropertyName("patron_status")]
|
||||
public string PatronStatus { get; set; }
|
||||
}
|
||||
|
||||
public sealed class Data
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public sealed class Address
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public Data Data { get; set; }
|
||||
}
|
||||
|
||||
// public sealed class CurrentlyEntitledTiers
|
||||
// {
|
||||
// [JsonPropertyName("data")]
|
||||
// public List<Datum> Data { get; set; }
|
||||
// }
|
||||
|
||||
// public sealed class Relationships
|
||||
// {
|
||||
// [JsonPropertyName("address")]
|
||||
// public Address Address { get; set; }
|
||||
//
|
||||
// // [JsonPropertyName("currently_entitled_tiers")]
|
||||
// // public CurrentlyEntitledTiers CurrentlyEntitledTiers { get; set; }
|
||||
// }
|
||||
|
||||
public sealed class PatreonResponse
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public List<PatreonMember> Data { get; set; }
|
||||
|
||||
[JsonPropertyName("included")]
|
||||
public List<PatreonUser> Included { get; set; }
|
||||
|
||||
[JsonPropertyName("links")]
|
||||
public PatreonLinks Links { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonLinks
|
||||
{
|
||||
[JsonPropertyName("next")]
|
||||
public string Next { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonUser
|
||||
{
|
||||
[JsonPropertyName("attributes")]
|
||||
public PatreonUserAttributes Attributes { get; set; }
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
// public string Type { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonUserAttributes
|
||||
{
|
||||
[JsonPropertyName("social_connections")]
|
||||
public PatreonSocials SocialConnections { get; set; }
|
||||
}
|
||||
public sealed class PatreonSocials
|
||||
{
|
||||
[JsonPropertyName("discord")]
|
||||
public DiscordSocial Discord { get; set; }
|
||||
}
|
||||
|
||||
public sealed class DiscordSocial
|
||||
{
|
||||
[JsonPropertyName("user_id")]
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonMember
|
||||
{
|
||||
[JsonPropertyName("attributes")]
|
||||
public Attributes Attributes { get; set; }
|
||||
|
||||
[JsonPropertyName("relationships")]
|
||||
public Relationships Relationships { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public sealed class Relationships
|
||||
{
|
||||
[JsonPropertyName("user")]
|
||||
public PatreonRelationshipUser User { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonRelationshipUser
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public PatreonUserData Data { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PatreonUserData
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace NadekoBot.Modules.Utility.Common
|
||||
namespace NadekoBot.Modules.Utility.Common;
|
||||
|
||||
public enum StreamRoleListType
|
||||
{
|
||||
public enum StreamRoleListType
|
||||
{
|
||||
Whitelist,
|
||||
Blacklist,
|
||||
}
|
||||
}
|
||||
Whitelist,
|
||||
Blacklist,
|
||||
}
|
||||
Reference in New Issue
Block a user