Skip to content

0x263b/Porygon2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Porygon2

An IRC Bot written in Go

Install

# Dependencies
go get -u github.com/thoj/go-ircevent github.com/steveyen/gkvlite github.com/PuerkitoBio/goquery github.com/dustin/go-humanize github.com/kennygrant/sanitize gopkg.in/xmlpath.v2 github.com/kurrik/oauth1a github.com/kurrik/twittergo

# Porygon2
go get -u github.com/0x263b/porygon2

Example

package main

import (
	"github.com/0x263b/porygon2"
	_ "github.com/0x263b/porygon2/commands/8ball"
	_ "github.com/0x263b/porygon2/commands/admin"
	_ "github.com/0x263b/porygon2/commands/bing"
	_ "github.com/0x263b/porygon2/commands/choose"
	_ "github.com/0x263b/porygon2/commands/lastfm"
	_ "github.com/0x263b/porygon2/commands/opengraph"
	_ "github.com/0x263b/porygon2/commands/translate"
	_ "github.com/0x263b/porygon2/commands/twitter"
	_ "github.com/0x263b/porygon2/commands/urbandictionary"
	_ "github.com/0x263b/porygon2/commands/weather"
	_ "github.com/0x263b/porygon2/commands/wolfram"
	_ "github.com/0x263b/porygon2/commands/youtube"
)

func main() {
	config := newConfig()
	bot.Run(config)
}

func newConfig() *bot.Configure {
	return &bot.Configure{
		Server:   "irc.rizon.net:6697", // "server:port"
		Channel:  "#Porygon2",          // "#channel" or "#channel key"
		User:     "Porygon2",           // "bot"
		Nick:     "Porygon2",           // "bot"
		Nickserv: "some password",      // leave as "" if none
		Modes:    "GRp",                // "GRp"
		UseTLS:   true,                 // true/false
		Debug:    false,                // true/false
		Prefix:   "!",                  // "!"
		Owner:    "joe",                // your nick
		API: bot.API{
			Bing:                  "",
			Geocode:               "",
			Giphy:                 "",
			Lastfm:                "",
			Translate:             "",
			TwitterConsumerKey:    "",
			TwitterConsumerSecret: "",
			Weather:               "",
			Wolfram:               "",
			Youtube:               "",
		},
	}
}

Ubuntu service

Save as /etc/init/porygon2.conf and run service porygon2 start

# Upstart Configuration

description     "Porygon2"
author          "Black Smiling Face"

start on (net-device-up
          and local-filesystems
          and runlevel [2345])

stop on runlevel [016]

respawn

exec /path/to/porygon2

APIs

About

An IRC bot written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages