mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Renamed the bot from KickBot -> ChatBot and removed the reference to Kick in the project name
This commit is contained in:
13
KfChatDotNetBot/Models/BuiltInSettingsModel.cs
Normal file
13
KfChatDotNetBot/Models/BuiltInSettingsModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class BuiltInSettingsModel
|
||||
{
|
||||
// Model here largely maps to what's in SettingDbModel, the idea is that there's a set of built-in settings that get
|
||||
// populated when migrating old JSON configs and updated on start if there's a schema change (e.g. regex changed)
|
||||
public required string Key { get; set; }
|
||||
public required string Regex { get; set; }
|
||||
public required string Description { get; set; }
|
||||
public string? Default { get; set; }
|
||||
public required bool IsSecret { get; set; }
|
||||
|
||||
}
|
||||
30
KfChatDotNetBot/Models/ConfigModel.cs
Normal file
30
KfChatDotNetBot/Models/ConfigModel.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
[Obsolete]
|
||||
public class ConfigModel
|
||||
{
|
||||
public Uri PusherEndpoint { get; set; } =
|
||||
new("wss://ws-us2.pusher.com/app/eb1d5f283081a78b932c?protocol=7&client=js&version=7.6.0&flash=false");
|
||||
|
||||
public Uri KfWsEndpoint { get; set; } = new("wss://kiwifarms.st:9443/chat.ws");
|
||||
|
||||
public List<string> PusherChannels { get; set; } = [];
|
||||
public int KfChatRoomId { get; set; }
|
||||
// Proxy to use for everything
|
||||
public string? Proxy { get; set; }
|
||||
public int KfReconnectTimeout { get; set; } = 30;
|
||||
public int PusherReconnectTimeout { get; set; } = 30;
|
||||
public bool EnableGambaSeshDetect { get; set; } = true;
|
||||
public int GambaSeshUserId { get; set; } = 168162;
|
||||
public string KickIcon { get; set; } = "https://i.ibb.co/0cqwscx/kick.png";
|
||||
public string KfDomain { get; set; } = "kiwifarms.st";
|
||||
public required string KfUsername { get; set; }
|
||||
public required string KfPassword { get; set; }
|
||||
public string ChromiumPath { get; set; } = "chromium_install";
|
||||
public int? BossmanJackTwitchId { get; set; } = null;
|
||||
public string? BossmanJackTwitchUsername { get; set; } = "thebossmanjack";
|
||||
// Used for testing
|
||||
public bool SuppressChatMessages { get; set; } = false;
|
||||
public string? DiscordToken { get; set; } = null;
|
||||
public string? DiscordBmjId { get; set; } = "554123642246529046";
|
||||
}
|
||||
17
KfChatDotNetBot/Models/DbModels/HowlggBetsDbModel.cs
Normal file
17
KfChatDotNetBot/Models/DbModels/HowlggBetsDbModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace KfChatDotNetBot.Models.DbModels;
|
||||
|
||||
public class HowlggBetsDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required int UserId { get; set; }
|
||||
// Per-user bet ID, counts up based on total # of bets
|
||||
public required int BetId { get; set; }
|
||||
// Global bet ID
|
||||
public required long GameId { get; set; }
|
||||
// Cents
|
||||
public required long Bet { get; set; }
|
||||
// Cents
|
||||
public required long Profit { get; set; }
|
||||
public required DateTimeOffset Date { get; set; }
|
||||
public required string Game { get; set; }
|
||||
}
|
||||
9
KfChatDotNetBot/Models/DbModels/JuicerDbModel.cs
Normal file
9
KfChatDotNetBot/Models/DbModels/JuicerDbModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace KfChatDotNetBot.Models.DbModels;
|
||||
|
||||
public class JuicerDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required UserDbModel User { get; set; }
|
||||
public float Amount { get; set; }
|
||||
public DateTimeOffset JuicedAt { get; set; }
|
||||
}
|
||||
19
KfChatDotNetBot/Models/DbModels/SettingDbModel.cs
Normal file
19
KfChatDotNetBot/Models/DbModels/SettingDbModel.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace KfChatDotNetBot.Models.DbModels;
|
||||
|
||||
public class SettingDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public required string Key { get; set; }
|
||||
public string? Value { get; set; }
|
||||
// For validation
|
||||
public required string Regex { get; set; } = @"\S+";
|
||||
// Friendly descriptor for the setting, e.g. "BossmanJack's howl.gg ID"
|
||||
public required string Description { get; set; }
|
||||
// Default to use when constructing the setting and nothing is supplied
|
||||
public string? Default { get; set; } = null;
|
||||
// Prevents the value from being revealed to Sneedchat when queried by an admin
|
||||
public bool IsSecret { get; set; } = false;
|
||||
}
|
||||
21
KfChatDotNetBot/Models/DbModels/UserDbModel.cs
Normal file
21
KfChatDotNetBot/Models/DbModels/UserDbModel.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace KfChatDotNetBot.Models.DbModels;
|
||||
|
||||
public class UserDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required string KfUsername { get; set; }
|
||||
public int KfId { get; set; }
|
||||
public UserRight UserRight { get; set; } = UserRight.Guest;
|
||||
public bool Ignored { get; set; } = false;
|
||||
}
|
||||
|
||||
public enum UserRight
|
||||
{
|
||||
Admin = 1000,
|
||||
[Description("True and Honest")]
|
||||
TrueAndHonest = 100,
|
||||
Guest = 10,
|
||||
Loser = 0
|
||||
}
|
||||
50
KfChatDotNetBot/Models/HowlggModels.cs
Normal file
50
KfChatDotNetBot/Models/HowlggModels.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class HowlggBetHistoryResponseModel
|
||||
{
|
||||
[JsonPropertyName("user")]
|
||||
public required HowlggUserModel User { get; set; }
|
||||
[JsonPropertyName("history")]
|
||||
public required HowlggHistoryModel History { get; set; }
|
||||
}
|
||||
|
||||
public class HowlggUserModel
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required int Id { get; set; }
|
||||
[JsonPropertyName("name")]
|
||||
public required string Name { get; set; }
|
||||
[JsonPropertyName("createdAt")]
|
||||
public required DateTimeOffset CreatedAt { get; set; }
|
||||
[JsonPropertyName("netProfit")]
|
||||
public long NetProfit { get; set; }
|
||||
}
|
||||
|
||||
public class HowlggHistoryModel
|
||||
{
|
||||
[JsonPropertyName("profit")]
|
||||
public required long Profit { get; set; }
|
||||
[JsonPropertyName("cumulative")]
|
||||
public required long Cumulative { get; set; }
|
||||
[JsonPropertyName("data")]
|
||||
public required List<HowlggHistoryDataModel> Data { get; set; }
|
||||
}
|
||||
|
||||
public class HowlggHistoryDataModel
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required int Id { get; set; }
|
||||
[JsonPropertyName("bet")]
|
||||
public required long Bet { get; set; }
|
||||
[JsonPropertyName("date")]
|
||||
// For some reason it has a +2 offset
|
||||
public required DateTimeOffset Date { get; set; }
|
||||
[JsonPropertyName("game")]
|
||||
public required string Game { get; set; }
|
||||
[JsonPropertyName("gameId")]
|
||||
public required long GameId { get; set; }
|
||||
[JsonPropertyName("profit")]
|
||||
public required long Profit { get; set; }
|
||||
}
|
||||
62
KfChatDotNetBot/Models/JackpotModels.cs
Normal file
62
KfChatDotNetBot/Models/JackpotModels.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class JackpotWsPacketModel
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required string Id { get; set; }
|
||||
[JsonPropertyName("type")]
|
||||
public required string Type { get; set; }
|
||||
[JsonPropertyName("payload")]
|
||||
public JsonElement? Payload { get; set; }
|
||||
}
|
||||
|
||||
public class JackpotWsBetPayloadModel
|
||||
{
|
||||
[JsonPropertyName("createdAt")]
|
||||
public required long CreatedAt { get; set; }
|
||||
[JsonPropertyName("roundId")]
|
||||
public required string RoundId { get; set; }
|
||||
[JsonPropertyName("gameName")]
|
||||
public required string GameName { get; set; }
|
||||
[JsonPropertyName("gameSlug")]
|
||||
public required string GameSlug { get; set; }
|
||||
[JsonPropertyName("currency")]
|
||||
public required string Currency { get; set; }
|
||||
[JsonPropertyName("wager")]
|
||||
public required float Wager { get; set; }
|
||||
[JsonPropertyName("payout")]
|
||||
public required float Payout { get; set; }
|
||||
[JsonPropertyName("multiplier")]
|
||||
public required float Multiplier { get; set; }
|
||||
[JsonPropertyName("user")]
|
||||
public required string User { get; set; }
|
||||
}
|
||||
|
||||
public class JackpotQuickviewModel
|
||||
{
|
||||
[JsonPropertyName("createdAt")]
|
||||
public required long CreatedAt { get; set; }
|
||||
[JsonPropertyName("userId")]
|
||||
public required string UserId { get; set; }
|
||||
[JsonPropertyName("username")]
|
||||
public required string Username { get; set; }
|
||||
[JsonPropertyName("isPrivate")]
|
||||
public bool IsPrivate { get; set; }
|
||||
[JsonPropertyName("role")]
|
||||
public required string Role { get; set; }
|
||||
[JsonPropertyName("rankId")]
|
||||
public required int RankId { get; set; }
|
||||
[JsonPropertyName("rank")]
|
||||
public required string Rank { get; set; }
|
||||
[JsonPropertyName("rankProgress")]
|
||||
public required float RankProgress { get; set; }
|
||||
[JsonPropertyName("wagered")]
|
||||
public required Dictionary<string, float> Wagered { get; set; }
|
||||
[JsonPropertyName("bets")]
|
||||
public required Dictionary<string, int> Bets { get; set; }
|
||||
[JsonPropertyName("wins")]
|
||||
public required Dictionary<string, int> Wins { get; set; }
|
||||
}
|
||||
26
KfChatDotNetBot/Models/PocketWatchModel.cs
Normal file
26
KfChatDotNetBot/Models/PocketWatchModel.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class PocketWatchModel
|
||||
{
|
||||
public required string Network { get; set; }
|
||||
public required string Address { get; set; }
|
||||
public required string Label { get; set; }
|
||||
public required bool BypassGambaSeshPresenceDetection { get; set; }
|
||||
public required int CheckIntervalSec { get; set; }
|
||||
// Used internally to detect new transactions
|
||||
public required DateTime LastChecked { get; set; } = DateTime.Now;
|
||||
}
|
||||
|
||||
public class PocketWatchEventModel
|
||||
{
|
||||
public required string TransactionHash { get; set; }
|
||||
public required DateTimeOffset Time { get; set; }
|
||||
public required string Currency { get; set; }
|
||||
public required string Effect { get; set; }
|
||||
public required string Network { get; set; }
|
||||
public required string Address { get; set; }
|
||||
public required long Balance { get; set; }
|
||||
public required float UsdRate { get; set; }
|
||||
public required bool IsMempool { get; set; }
|
||||
public required PocketWatchModel PocketWatch { get; set; }
|
||||
}
|
||||
58
KfChatDotNetBot/Models/ShuffleModels.cs
Normal file
58
KfChatDotNetBot/Models/ShuffleModels.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class ShuffleLatestBetModel
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required string Id { get; set; }
|
||||
[JsonPropertyName("username")]
|
||||
public string? Username { get; set; }
|
||||
[JsonPropertyName("vipLevel")]
|
||||
public required string VipLevel { get; set; }
|
||||
[JsonPropertyName("currency")]
|
||||
public required string Currency { get; set; }
|
||||
[JsonPropertyName("amount")]
|
||||
public required string Amount { get; set; }
|
||||
[JsonPropertyName("payout")]
|
||||
public required string Payout { get; set; }
|
||||
[JsonPropertyName("multiplier")]
|
||||
public required string Multiplier { get; set; }
|
||||
[JsonPropertyName("gameName")]
|
||||
public required string GameName { get; set; }
|
||||
[JsonPropertyName("gameCategory")]
|
||||
public required string GameCategory { get; set; }
|
||||
[JsonPropertyName("gameSlug")]
|
||||
public required string GameSlug { get; set; }
|
||||
}
|
||||
|
||||
// {
|
||||
// "data": {
|
||||
// "user": {
|
||||
// "id": "a98f83c3-89b7-4e8d-9e11-7dcf1a89b1ba",
|
||||
// "username": "TheBossmanJack",
|
||||
// "vipLevel": "SAPPHIRE_3",
|
||||
// "createdAt": "2024-06-16T23:17:58.533Z",
|
||||
// "avatar": 36,
|
||||
// "avatarBackground": 1,
|
||||
// "bets": 9450,
|
||||
// "usdWagered": "3518595.04092444",
|
||||
// "__typename": "User"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
public class ShuffleUserModel
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required string Id { get; set; }
|
||||
[JsonPropertyName("username")]
|
||||
public required string Username { get; set; }
|
||||
[JsonPropertyName("vipLevel")]
|
||||
public required string VipLevel { get; set; }
|
||||
[JsonPropertyName("createdAt")]
|
||||
public required DateTimeOffset CreatedAt { get; set; }
|
||||
[JsonPropertyName("bets")]
|
||||
public required int Bets { get; set; }
|
||||
[JsonPropertyName("usdWagered")]
|
||||
public required string UsdWagered { get; set; }
|
||||
}
|
||||
48
KfChatDotNetBot/Models/ThreeXplModels.cs
Normal file
48
KfChatDotNetBot/Models/ThreeXplModels.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class ThreeXplEventModel
|
||||
{
|
||||
[JsonPropertyName("block")]
|
||||
public int? Block { get; set; }
|
||||
[JsonPropertyName("transaction")]
|
||||
public required string TransactionHash { get; set; }
|
||||
[JsonPropertyName("sort_key")]
|
||||
public int? SortKey { get; set; }
|
||||
[JsonPropertyName("time")]
|
||||
public DateTimeOffset? Time { get; set; }
|
||||
[JsonPropertyName("currency")]
|
||||
public required string Currency { get; set; }
|
||||
[JsonPropertyName("effect")]
|
||||
public required string Effect { get; set; }
|
||||
[JsonPropertyName("failed")]
|
||||
public bool? Failed { get; set; }
|
||||
[JsonPropertyName("extra")]
|
||||
public string? Extra { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplCurrencyModel
|
||||
{
|
||||
[JsonPropertyName("name")]
|
||||
public required string Name { get; set; }
|
||||
[JsonPropertyName("type")]
|
||||
public string? Type { get; set; }
|
||||
[JsonPropertyName("symbol")]
|
||||
public required string Symbol { get; set; }
|
||||
[JsonPropertyName("decimals")]
|
||||
public required int Decimals { get; set; }
|
||||
[JsonPropertyName("description")]
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplAddressModel
|
||||
{
|
||||
[JsonPropertyName("address")]
|
||||
public required string Address { get; set; }
|
||||
[JsonPropertyName("balances")]
|
||||
public required Dictionary<string, int?> Balances { get; set; }
|
||||
[JsonPropertyName("events")]
|
||||
public required Dictionary<string, int?> Events { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user