Skip to content

Instantly share code, notes, and snippets.

View loopyd's full-sized avatar

Robert Michael Smith loopyd

View GitHub Profile
@loopyd
loopyd / gate-verify.go
Last active May 9, 2020 15:25
[Yagscript] Verify command for gatekeeping channels with bot log integration
{{/* verify YAGPDB script by HeavyPaws#9551 */}}
{{/* Written for 18+ Discord Server Teams with gatekeeping channels */}}
{{/* DBAD Licensed - Don't be a dick! */}}
{{/* a. If you're not crediting me you're being a dick! */}}
{{ $args := parseArgs 1 ":x: Enter a valid userid or mention."
(carg "string" "user") }}
{{/* Script config */}}
{{$guildIconURL := joinStr "" "https://cdn.discordapp.com/icons/" .Guild.ID "/" .Guild.Icon ".png?size=16" }}
@loopyd
loopyd / remind-bump.go
Created April 18, 2020 15:48
[yagscript] DISBOARD bump reminder.
{{/* Yagscript by HeavyPaws#9551 */}}
{{/* No support is offered for these scripts ever. Unless they break on my production servers they wont be getting updates. }}
{{/* Instructions - Set as Minute interval trigger 120 minutes copy and paste with IDs aaaand enjoy */}}
{{$guildIconURL := joinStr "" "https://cdn.discordapp.com/icons/" .Guild.ID "/" .Guild.Icon ".png?size=16" }}
{{$cmdTitle :="Bump Reminder"}}
{{$cmdFooterText := joinStr "" .Guild.Name "| Goscript by HeavyPaws" }}
{{$colors := dict "red" 0xaa0000 "green" 0x89aa00 "yellow" 0xaaaa00 "blue" 0x0000aa}}
{{$snowflakes := dict "reminderChannel" 0000000000000000 "reminderRole" 0000000000000000 }}
@loopyd
loopyd / tatsumaki.ahk
Last active April 21, 2020 16:02
[ahk] Tatsumaki fishing v0.5 - proper OO structure
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; PawTask base class
class PawTask
{
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Constructors
__Init(commandText, duration, parent)
{
this.commandText := commandText
this.duration := duration
@loopyd
loopyd / rank.go
Created April 28, 2020 01:38
[Yagscript/yag-cc/levels] Improved rank card with cleaner embed display.
{{/*
This command manages viewing the rank of a given member.
Use by running `-rank [member]` where member is optional. Defaults to yourself.
You may also set a color for your rank card using `-rank set-color <hex>` or `-rank set-color default`.
Recommended trigger: Regex trigger with trigger `^-(rank|lvl|xp)`.
*/}}
{{/* Instantiate constants */}}
{{ $barEmpty := "░" }} {{/* Progress bar empty character */}}
{{ $barFull := "█" }} {{/* Progress bar fill character */}}
@loopyd
loopyd / leaderboard.go
Created April 28, 2020 16:02
[Yagscript/yagg-cc/levels] Clean UI look for Yag-cc/levels -leaderboard command.
{{/*
This command manages the leaderboard. Usage is -leaderboard [page] where page is optional.
Recommended trigger: Regex trigger with trigger `^-(leaderboard|lb|top)`.
*/}}
{{/* Configuration variables */}}
{{ $guildIconSize := 64 }} {{/* Size of the guild icon */}}
{{ $iconSize := 128 }} {{/* Size of the embed icon */}}
{{ $thumbnailURL := "https://i.imgur.com/mJ7zu6k.png" }} {{/* Use a self-hosted image */}}
@loopyd
loopyd / reactionListener.go
Created April 28, 2020 16:03
[Yagscript/yagg-cc/levels] Improved reactionListener to go along with leaderboard.go update. Includes a few bugfixes / patch to get things rolling again.
{{/*
WARNING: this command may be extremely buggy as I was unable to test it with limited users.
This command manages the pagination of the leaderboard command.
Recommended trigger: Reaction trigger on Reaction Added only.
*/}}
{{/* Configuration variables */}}
{{ $guildIconSize := 64 }} {{/* Size of the guild icon */}}
{{ $iconSize := 128 }} {{/* Size of the embed icon */}}
@loopyd
loopyd / embedHelper.cc.gotmpl
Last active May 1, 2020 23:11
[Yagscript/yag-cc/dialogHelper] Template to make the complex process of creating embed and abiding by Discord rate limit much easier
{{- define "embedBuilder" }}
{{/* Important stuff */}}
{{ $thisdot := . }}
{{ $embedFlag := false }} {{ $reactionFlag := false }} {{ $msg := "" }}
{{ if not .MessageID }} {{ .Set "MessageID" 0 }} {{ end }}
{{ if not .ChannelID }} {{ .Set "ChannelID" .Parent.Channel.ID }} {{ end }}
{{ if not .UserID }} {{ .Set "UserID" .Parent.User.ID }} {{ end }}
{{/* Construct base/derived embed object */}}
@loopyd
loopyd / minitooth.cmd
Last active October 12, 2021 02:11
[batch+ps1] Minitooth Portable FLUX Miner [WITH DOCS!]
@::!/dos/rocks
@echo off
setlocal enableextensions
goto :init
:header
echo. ****************************************************
echo. %__NAME% v%__VERSION%
echo. ****************************************************
echo.
@loopyd
loopyd / Get-HashEx.psm1
Last active May 1, 2024 17:23
[PowerShell 7] Get-HashEx - All-in-one file and folder hashing module for Windows PowerShell 7.0+
<#
.Synopsis
Hash a file or a folder via the lifestrea- er I mean, bytestream. Then return the results.
.Description
I improved Get-FileHash just a bit. Hash a file or a folder via the lifestrea- er I mean,
bytestream. Then returns the results. A lot of options, and what ever supported, hardware
accelerated CryptoStream HashAlgorithm provider you want. Also with real time progress,
which you can turn off if you want.
@loopyd
loopyd / simplerpg.go
Last active March 21, 2022 10:23
[YAGPDB] Simple RPG
{{/* SimpleRPG - YAGPDB Script by saber7ooth#6911 */}}
{{/* Enemy dad-abase (ahaha) - Now that you now how it works, ya can add more! */}}
{{$enemyDB := cslice
(sdict "Enemy" "Dragon" "Odds" (cslice 1 250) "SuccessMessage" "You managed to defeat the dragon!" "FailMessage" "You were burnt to a crisp while trying to murder the dragon..." "SuccessFlag" (sdict "AddSlain" 1) "FailFlag" (sdict "AddDefeated" 1) )
(sdict "Enemy" "Pegasus" "Odds" (cslice 1 250) "SuccessMessage" "You managed to kill it before it flew away!" "FailMessage" "The pegasus flew away..." "SuccessFlag" (sdict "AddSlain" 1) "FailFlag" (sdict "Nothing" 0))
(sdict "Enemy" "Unicorn" "Odds" (cslice 1 250) "SuccessMessage" "You managed to kill it and take it's prismatic horn!" "FailMessage" "The pegasus flew away..." "SuccessFlag" (sdict "AddSlain" 1) "FailFlag" (sdict "AddDamage" 1))
(sdict "Enemy" "Fairy Queen" "Odds" (cslice 1 250) "SuccessMessage" "You successfully defeated the Fairy Queen and stole her treasures!" "FailMessage"