This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/ripple_shader" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_amount ("_amount", Range(0.01, 1.0)) = 0.5 | |
_spread ("_spread", Range(0.01, 1.0)) = 0.5 | |
_width ("_width", Range(0.01, 1.0)) = 0.5 | |
_alpha ("_alpha", Range(0.01, 1.0)) = 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IJWTStore | |
{ | |
Tokens Authenticate(LoginUser users); //This is a small Model of just Username Password you can make your own | |
string GetNameFromToken(string token); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SixLabors.ImageSharp; | |
using SixLabors.ImageSharp.Processing; | |
public static class GenericHelperFunctions | |
{ | |
public static bool RegChecks(string checkedto) | |
{ | |
string pattern = @"^[a-zA-Z0-9_.-]*$"; // Letter and words only | |
Regex regex = new Regex(pattern); | |
DebugWrite(regex.IsMatch(checkedto)); | |
// Compare a string against the regular expression |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Replace Email | |
<div class="form-floating"> | |
<input asp-for="Input.Email" class="form-control" autocomplete="username" aria-required="true" /> | |
<label asp-for="Input.Email" class="form-label"></label> | |
<span asp-validation-for="Input.Email" class="text-danger"></span> | |
</div> | |
//with everything under here | |
<div class="form-floating"> | |
<input asp-for="Input.UserName" class="form-control" autocomplete="username" aria-required="true" /> | |
<label asp-for="Input.UserName" class="form-label"></label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CreateDatabase(); | |
using (var scope = app.Services.CreateScope()) //Creates a new scope | |
{ | |
//Resolve ASP .NET Core Identity with DI help | |
var roleManager = (RoleManager<IdentityRole>)scope.ServiceProvider.GetService<RoleManager<IdentityRole>>(); //gets services | |
var userManager = (UserManager<IdentityUser>)scope.ServiceProvider.GetService<UserManager<IdentityUser>>(); | |
CreateRolesAsync(roleManager).Wait(); | |
CreateSuperUser(userManager).Wait(); | |
} | |
//important that this is called after these |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//if you want to make a group command with like a /example function you have to make a slash group | |
[SlashCommandGroup("example", "for example purposes")] | |
public class exampleCommands : ApplicationCommandModule | |
{ | |
//ONLY FOR BAKABOT DEV | |
public Configuration configuration { get; set; } //reference this for using configuration singleton | |
// | |
//Adding SlashCommands | |
[SlashCommand("function", "function you want to add")] //will activate on /example function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In here(the command file for the !help or /Dosomething ) you make the modal pop up | |
[SlashCommand("newModalPopup", "popsup a sample Modal")] | |
public async Task newModalPopup(InteractionContext ctx) | |
{ | |
var response = new DiscordInteractionResponseBuilder(); | |
response | |
.WithTitle("the title of the modal ") | |
.WithCustomId(ModalEvent.modalNames.{name you created in ModalEvent.cs line 5 }) //name you created in ModalEvent.cs line 5 |