Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/douglascdev/buttifier

Go package that uses randomness to turn syllables into "butt" or a custom word.
https://github.com/douglascdev/buttifier

butt buttsbot go golang twitch

Last synced: 4 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# buttifier


butt

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

## Installation

```bash
go get github.com/douglascdev/buttifier
```

## Usage

```go
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")
}
```