seacat schizogame added

as a sidenote, also updated discord.net
This commit is contained in:
Lan
2022-06-19 02:03:57 +03:00
parent 5eba608962
commit 5ee577808d
8 changed files with 510 additions and 11 deletions

View File

@@ -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,7 +233,12 @@ 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();
}
}
}

View File

@@ -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();
}