Skip to content

douglascdev/buttifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buttifier

butt

Replace syllables with butt(default) or a custom word. Made for a twitch bot.

Installation

go get github.com/douglascdev/buttifier

Usage

package main

import "github.com/douglascdev/buttifier"

func main() {
	buttifier, err := buttifier.New()

	// 50% chance of buttifying the sentence passed to ButtifySentence
	buttifier.ButtificationProbability = 0.5
	// buttify about 30% of the syllables
	buttifier.ButtificationRate = 0.3
	// what each buttified syllable should be replaced with
	buttifier.ButtWord = "butt"

	if err != nil {
		panic(err)
	}
	newSentence, didButtify := buttifier.ButtifySentence("Someone did that something something")
	if didButtify {
		// Someone butt that something something
		println(newSentence)
		return
	}
	println("Did not buttify sentence")
}

About

Go package that uses randomness to turn syllables into "butt" or a custom word.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages