seacat schizogame added

as a sidenote, also updated discord.net
master
Lan 2 years ago
parent 5eba608962
commit 5ee577808d
  1. 5
      Kehyeedra3/Bot.cs
  2. 39
      Kehyeedra3/Commands/Admin.cs
  3. 78
      Kehyeedra3/Commands/Stuff.cs
  4. 6
      Kehyeedra3/Kehyeedra3.csproj
  5. 320
      Kehyeedra3/Migrations/20220618191051_Schizogayme.Designer.cs
  6. 53
      Kehyeedra3/Migrations/20220618191051_Schizogayme.cs
  7. 12
      Kehyeedra3/Migrations/ApplicationDbContextModelSnapshot.cs
  8. 4
      Kehyeedra3/Services/Models/Guild.cs

@ -63,8 +63,9 @@ namespace Kehyeedra3
LogLevel = LogSeverity.Verbose,
DefaultRetryMode = RetryMode.AlwaysRetry,
HandlerTimeout = 10000,
ConnectionTimeout = 10000
});
ConnectionTimeout = 10000,
GatewayIntents = GatewayIntents.AllUnprivileged | GatewayIntents.GuildMembers | GatewayIntents.GuildMessages
}) ;
AudioService = new AudioService();

@ -201,6 +201,11 @@ namespace Kehyeedra3.Commands
guild.Changenick = true;
}
break;
case "schizogame":
{
guild.Schizogame = true;
}
break;
}
await Database.SaveChangesAsync();
await ReplyAsync($"{Context.User.Mention}\nEnabled {feature}");
@ -228,6 +233,11 @@ namespace Kehyeedra3.Commands
guild.Changenick = false;
}
break;
case "schizogame":
{
guild.Schizogame = false;
}
break;
}
await Database.SaveChangesAsync();
await ReplyAsync($"{Context.User.Mention}\nDisabled {feature}");
@ -395,7 +405,7 @@ namespace Kehyeedra3.Commands
public async Task ButtonTest() // button testing
{
var components = new ComponentBuilder().WithButton("cum", "cum").WithButton("piss", "piss");
await Context.Channel.SendMessageAsync($"Greetings traveler, I've potions for you to purchase, what'd you like to have?",component:components.Build());
await Context.Channel.SendMessageAsync($"Greetings traveler, I've potions for you to purchase, what'd you like to have?",components:components.Build());
}
[RequireRolePrecondition(AccessLevel.ServerAdmin)]
@ -597,7 +607,7 @@ namespace Kehyeedra3.Commands
if (fish == null)
{
await Context.Channel.SendMessageAsync("No fish with that name retarb, chenk input and try again, or cry to mommy");
await Context.Channel.SendMessageAsync("No fish with that name retarb, chenk input and try again, or cry to mmomijji (CHRISMAS IN JUYLL!!!!!)");
return;
}
}
@ -611,5 +621,30 @@ namespace Kehyeedra3.Commands
outputStream.Position = 0;
await Context.Channel.SendFileAsync(outputStream, $"card.{outFormat}");
}
[RequireRolePrecondition(AccessLevel.ServerAdmin)]
[Command("szconfig"),Summary("szsetlogchannel, szsetchannel, szsetwitchrole")]
public async Task ConfigureServerSpecific(string command, string option = null)
{
command = command.ToLowerInvariant();
var Database = new ApplicationDbContextFactory().CreateDbContext();
var guild = Database.Guilds.FirstOrDefault(x => x.Id == Context.Guild.Id);
if (command == "setlogchannel")
{
guild.SchizoLogChannel = Context.Channel.Id;
await ReplyAsync($"Set current channel as schizo log channel.");
}
if (command == "setchannel")
{
guild.SchizoChannel = Context.Channel.Id;
await ReplyAsync($"Set current channel as schizo bot channel.");
}
if (command == "setwitchrole")
{
guild.WitchRole = Convert.ToUInt64(option);
await ReplyAsync($"Set <@&{option}> as witch role.");
}
await Database.SaveChangesAsync();
}
}
}

@ -410,6 +410,84 @@ namespace Kehyeedra3.Commands
}
}
[Command("schizo"),Alias("sz"), Summary("Replaces your message with a red or blue variant, for use with funny seacat schizo game. There's also an orange for posting the 'original story'")]
public async Task SchizoGame(string colour, [Remainder]string message)
{
using var Database = new ApplicationDbContextFactory().CreateDbContext();
var guild = Database.Guilds.FirstOrDefault(x => x.Id == Context.Guild.Id);
string msg = "";
if (guild == null)
{
guild = new Guild
{
Id = Context.Guild.Id
};
Database.Guilds.Add(guild);
}
if (!guild.Schizogame)
{
await ReplyAsync($"{Context.User.Mention}\nThis command can be enabled by an admin on the server.");
return;
}
if (Context.Channel.Id == 0)
{
await ReplyAsync($"{Context.User.Mention}\nYou gots to set the schizo channel??");
return;
}
if (Context.Channel.Id != guild.SchizoChannel)
{
await ReplyAsync($"{Context.User.Mention}\nWrong channel??");
return;
}
colour = colour.ToLowerInvariant();
if (colour == "red" || colour == "r")
{
var guser = Context.User as IGuildUser;
if (guser.RoleIds.Contains(guild.WitchRole))
{
msg = $"```diff\n- {message} ```";
await ReplyAsync(msg);
}
else
{
await ReplyAsync($"{Context.User.Mention}\nYOU are not the WITCH! YOU are a BITCH!");
return;
}
}
else if (colour == "blue" || colour == "b")
{
msg = $"```ini\n[ {message} ]```";
await ReplyAsync(msg);
}
else if (colour == "orange" || colour == "o")
{
var guser = Context.User as IGuildUser;
if (guser.RoleIds.Contains(guild.WitchRole))
{
msg = $"```css\n[ {msg} ]```";
await ReplyAsync(msg);
}
else
{
await ReplyAsync($"{Context.User.Mention}\nYOU are not the WITCH! YOU are a BITCH!");
return;
}
}
else
{
await ReplyAsync($"bruH! you gotta use red or blue! BRUH! r or b works also! bruh! ong WITH cap! MID AF!");
return;
}
if (guild.SchizoLogChannel > 0)
{
await Context.Guild.GetTextChannel(guild.SchizoLogChannel).SendMessageAsync(msg);
}
await Context.Message.DeleteAsync();
}

@ -8,11 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Discord.Net.Labs.Commands" Version="2.3.4" />
<PackageReference Include="Discord.Net.Labs.Core" Version="2.3.9-pre" />
<PackageReference Include="Discord.Net.Labs.Rest" Version="2.3.9-pre" />
<PackageReference Include="Discord.Net.Labs.Webhook" Version="2.3.3" />
<PackageReference Include="Discord.Net.Labs.WebSocket" Version="2.3.9-pre" />
<PackageReference Include="Discord.Net" Version="3.7.2" />
<PackageReference Include="dotenv.net" Version="2.1.3" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="7.23.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.11">

@ -0,0 +1,320 @@
// <auto-generated />
using System;
using Kehyeedra3;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Kehyeedra3.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20220618191051_Schizogayme")]
partial class Schizogayme
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Kehyeedra3.Services.Models.Farming", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<string>("CropInventory")
.HasColumnType("LONGTEXT");
b.Property<int>("EmployeeCount")
.HasColumnType("int");
b.Property<ulong>("FXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<string>("PlotInventory")
.HasColumnType("LONGTEXT");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<int>("Tier")
.HasColumnType("int");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Farming");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Fishing", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("FXp")
.HasColumnType("bigint unsigned");
b.Property<string>("Inventory")
.HasColumnType("LONGTEXT");
b.Property<ulong>("LastFish")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<int>("Prestige")
.HasColumnType("int");
b.Property<byte>("RodOwned")
.HasColumnType("tinyint unsigned");
b.Property<byte>("RodUsed")
.HasColumnType("tinyint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Fishing");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Guild", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<bool>("Changenick")
.HasColumnType("tinyint(1)");
b.Property<ulong>("SchizoChannel")
.HasColumnType("bigint unsigned");
b.Property<ulong>("SchizoLogChannel")
.HasColumnType("bigint unsigned");
b.Property<bool>("Schizogame")
.HasColumnType("tinyint(1)");
b.Property<ulong>("WitchRole")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Guilds");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.Property<ulong>("OfferId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<ulong>("BuyerId")
.HasColumnType("bigint unsigned");
b.Property<bool>("IsPurchaseFromStore")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsSellOffer")
.HasColumnType("tinyint(1)");
b.Property<ulong>("ItemId")
.HasColumnType("bigint unsigned");
b.Property<int>("OfferAmount")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("StoreId")
.HasColumnType("bigint unsigned");
b.HasKey("OfferId");
b.HasIndex("StoreFrontId");
b.ToTable("ItemOffer");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Mining", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("LastMine")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Mining");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Reminder", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("Created")
.HasColumnType("bigint unsigned");
b.Property<string>("Message")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("Send")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Reminders");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreFront", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("StoreItemType")
.HasColumnType("int");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("StoreFronts");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.Property<ulong>("InvId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<string>("Item")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<int>("Price")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.HasKey("InvId");
b.HasIndex("StoreFrontId");
b.ToTable("StoreInventory");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<string>("Avatar")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<sbyte>("CurrentBattlefish")
.HasColumnType("TINYINT");
b.Property<string>("GeneralInventory")
.HasColumnType("LONGTEXT");
b.Property<long>("Money")
.HasColumnType("bigint");
b.Property<ulong>("OwnerId")
.HasColumnType("bigint unsigned");
b.Property<string>("Username")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User+BattleFishObject", b =>
{
b.Property<ulong>("FishId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<sbyte>("FishType")
.HasColumnType("TINYINT");
b.Property<int>("Lvl")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("NextXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("FishId");
b.ToTable("Battlefish");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Offers")
.HasForeignKey("StoreFrontId");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Items")
.HasForeignKey("StoreFrontId");
});
#pragma warning restore 612, 618
}
}
}

@ -0,0 +1,53 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Kehyeedra3.Migrations
{
public partial class Schizogayme : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<ulong>(
name: "SchizoChannel",
table: "Guilds",
nullable: false,
defaultValue: 0ul);
migrationBuilder.AddColumn<ulong>(
name: "SchizoLogChannel",
table: "Guilds",
nullable: false,
defaultValue: 0ul);
migrationBuilder.AddColumn<bool>(
name: "Schizogame",
table: "Guilds",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<ulong>(
name: "WitchRole",
table: "Guilds",
nullable: false,
defaultValue: 0ul);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SchizoChannel",
table: "Guilds");
migrationBuilder.DropColumn(
name: "SchizoLogChannel",
table: "Guilds");
migrationBuilder.DropColumn(
name: "Schizogame",
table: "Guilds");
migrationBuilder.DropColumn(
name: "WitchRole",
table: "Guilds");
}
}
}

@ -99,6 +99,18 @@ namespace Kehyeedra3.Migrations
b.Property<bool>("Changenick")
.HasColumnType("tinyint(1)");
b.Property<ulong>("SchizoChannel")
.HasColumnType("bigint unsigned");
b.Property<ulong>("SchizoLogChannel")
.HasColumnType("bigint unsigned");
b.Property<bool>("Schizogame")
.HasColumnType("tinyint(1)");
b.Property<ulong>("WitchRole")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Guilds");

@ -13,5 +13,9 @@ namespace Kehyeedra3.Services.Models
[Key]
public ulong Id { get; set; } = 0;
public bool Changenick { get; set; } = false;
public bool Schizogame { get; set; } = false;
public ulong SchizoChannel { get; set; } = 0;
public ulong WitchRole { get; set; } = 0;
public ulong SchizoLogChannel { get; set; } = 0;
}
}

Loading…
Cancel
Save