{"id":18646140,"url":"https://github.com/bartenbach/buttbutt","last_synced_at":"2025-11-05T04:30:37.773Z","repository":{"id":22984938,"uuid":"26335264","full_name":"bartenbach/buttbutt","owner":"bartenbach","description":"A Java IRC bot inspired by ButtBot with various other functionality","archived":false,"fork":false,"pushed_at":"2022-01-16T04:45:39.000Z","size":629,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-27T11:45:34.155Z","etag":null,"topics":["irc","irc-bot","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bartenbach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-07T19:50:29.000Z","updated_at":"2022-01-07T02:22:55.000Z","dependencies_parsed_at":"2022-08-21T17:50:51.485Z","dependency_job_id":null,"html_url":"https://github.com/bartenbach/buttbutt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartenbach%2Fbuttbutt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartenbach%2Fbuttbutt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartenbach%2Fbuttbutt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartenbach%2Fbuttbutt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartenbach","download_url":"https://codeload.github.com/bartenbach/buttbutt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449595,"owners_count":19640535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["irc","irc-bot","java"],"created_at":"2024-11-07T06:18:30.069Z","updated_at":"2025-11-05T04:30:37.731Z","avatar_url":"https://github.com/bartenbach.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IRCbutt\nA Java IRC bot inspired by buttbot, with various other functionality.\n\nOriginal ideas, and some borrowed from phrik from #archlinux on freenode\n\n![Real photograph of buttbutt](buttbot.gif \"Real photographs of buttbutt\")\n\n## Download\n\nIRCbutt is built using OpenJDK 17\n\n## Running\n\nRun with `java -jar IRCbutt*.jar`\n\n## Usage:\n#### Basic Usage:\nMost commands start with `!` followed by the command name, then arguments.\n\nFact requests start with either a `~` or `!` followed immediately by the fact name.\n\nYou don't include the brackets `\u003c\u003e`\n\n#### Command Substitution:\n\nMost commands support command substitution.  An example of this would be `!echo $(rot $(fact))`\n\nThe result of this would be a rot13 encrypted, random fact.\n\nFor extra mature fun, try `!butt $(fact)`\n\n#### Variables:\n\nThe variable `$USER` will be replaced with the user making the request. \n\nTry `!echo $USER`\n\nWhen used in facts, the variable `$ME` will cause the bot to do a `/me` command in IRC.\n\nThe variables `$1`, `$2`, `$3`, `$4`, etc can be used in facts as the corresponding arguments to a fact.\nFor example, the fact \"Hello $1!\" when called with `~hello test` will print \"Hello test!\".\n\n### Basic Functionality\n\n`!8 \u003cquestion\u003e`         -  Ask the Magic 8 Ball a question\n\n`!a \u003cquery\u003e`            -  Search Amazon for an item.\n\n`!butt \u003cquery\u003e`         -  Replace random words in the text with 'butt' (for mature audiences only)\n\n`!check \u003cquery\u003e`        -  Get a random response on whether or not something passes or fails (or rarely, something else)\n\n`!coin \u003cquery\u003e`         -  Get a random heads or tails response (or rarely, another surprise)\n\n`!define \u003cquery\u003e`       -  Get the definition of a word from Merriam Webster\n\n`!dice`                 -  Roll a dice to land on a random user in the room that will either WIN or LOSE.\n\n`!echo \u003cquery\u003e`         -  Echo something (commands can be echoed with $(command))\n\n`!g \u003cquery\u003e`            -  Google something\n\n`!gi \u003cquery\u003e`           -  Google Image Search\n\n`!give \u003cuser\u003e \u003cthing\u003e`  -  Give something to someone else\n\n`!more`                 -  Get more results for facts, quotes, or search results\n\n`!rot \u003cquery\u003e`          -  Get the rot13 equivalent of `\u003cquery\u003e`.  Alias: !rot\n\n`!s/search/replace/`    -  This works just like Vim's search and replace feature.\n\n`!uptime`               -  Print the current uptime of the bot\n\n`!version`              -  Get the current bot version\n\n`!wr`                   -  Wake the room!  Ping everbody in the room.\n\n`!yt \u003cquery\u003e`           -  Search YouTube for `\u003cquery\u003e`\n\n### Cryptocurrency Functionality\n\nThe bot can get information for many cryptocurrencies such as the current market value, 24 change, and market cap from\nthe public CoinMarketCap API. More can easily be added in the future to CryptoCurrencyCommand.\n\nThis is done by doing the following:\n\n`!\u003cticker symbol\u003e`    -  Get all the available information for the specified cryptocurrency.\n\nYou can also perform mathematical operations on cryptocurrency values using !eval and such.  This is done by appending the\nletter 'v' (for value) to the ticker symbol, as shown below.\n\n`!\u003cticker symbol\u003ev`   -  Get only the current market value as an unrounded double.\n\nCurrently supported currencies are as follows:\n\"btc\", \"ltc\", \"eth\", \"vtc\", \"xrp\", \"bch\", \"dash\", \"iota\", \"wtc\", \"ada\", \"xem\", \"btg\",, \"xmr\", \"eos\", \"xlm\", \"zec\", \n\"usdt\", \"steem\", \"doge\", \"bnb\", \"gnt\", \"etc\", \"neo\", \"ppt\", \"bcc\", \"qtum\", \"waves\", \"trx\", \"xvg\", \"icx\", \"poe\"\n\n`!top`                -  Show the top 10 cryptocurrencies on CoinMarketCap and information about them.\n\n`!top 10 20`          -  Show the top cryptocurrencies on CoinMarketCap from rage 10 to 20.\n\n### Math Functionality\n\n`!sqrt \u003cnumber\u003e`      -  Get the square root of `\u003cnumber\u003e`\n\n`!pow \u003cnum1\u003e \u003cnum2\u003e`  -  Get the result of num1^num2\n\n`!eval \u003cexpression\u003e`  -  Use Jeval to evaluate an expression. ex: !eval sin(0)\n\nEval can also be used with other commands.  Ex: `!eval $(ltcv) * 10` to see the value of 10 Litecoins.\n\n### Fact Functionality\n\n`~\u003cstring\u003e`                   -  Any string prefixed with a tilde finds the corresponding fact\n\n`!\u003cstring\u003e`                   -  Any string prefixed with an exclamation mark (that has a fact) finds the corresponding fact.\n\n`!fact`                       -  Retrieve a random factoid from the database\n\n`!learn \u003cfactname\u003e \u003cvalue\u003e`   -  Write a factoid to the database\n\n`!ff \u003cquery\u003e`                 -  Search for a fact (supports regular expressions)\n\n`!fi \u003cfactnumber\u003e`            -  Get information about a factoid\n\n`!append \u003cfactname\u003e \u003cstring\u003e` -  Appends `\u003cstring\u003e` to a current factoid\n\n`!forget \u003cfactname\u003e`          -  Delete a fact from the database (MUST BE CHANNEL OP!)\n\n### Quotegrab Functionality\n\n`!grab \u003cusername\u003e`     -  Grab and store the last message from `\u003cuser\u003e` in the database\n\n`!rq`                  -  Retrieve a random quote from the database\n\n`!q \u003cusername\u003e`        -  Retrieve the last grabbed quote from `\u003cuser\u003e`\n\n`!qf \u003cquery\u003e`          -  Search for a quote (supports regular expressions)\n\n`!qi \u003cquery\u003e`          -  Get information about a quote\n\n`!qsay \u003cquotenum\u003e`     -  Say quote by ID\n\n`!qdel \u003cid\u003e`           -  Delete a quote from the database (MUST BE CHANNEL OP!)\n\n### Karma Functionality\n\n`\u003crandomstring\u003e++`      -  Increase the karma of `\u003cwhatever\u003e`\n\n`\u003crandomstring\u003e--`      -  Decrease the karma of `\u003cwhatever\u003e`\n\n`!karma \u003crandomstring\u003e` -  Retrieve the current karma of `\u003cwhatever\u003e`\n\n## Configuration File\n```\n   Bot:\n       Name: buttbutt  // the bot's IRC nickname\n       Nickname: butt  // the name the bot uses to refer to itself in some messages\n       Login: buttbutt // the bot's IRC \"login\" value\n       Realname: butt  // the bot's IRC \"realname\" value\n       Password:       // the bot's IRC \"password\" value\n       Message-Delay: 0 // the delay, if any, before sending a message\n       No-Verify: false // false if the bot shouldn't learn from unverified users\n       Random-Response-Frequency: 100 // chance of butting a message is 1 in this number\n   Channels: // a list of channels the bot should join\n       - '#afterlunch'\n       - '##anotherchannel'\n   Server: // standard settings for connecting to IRC servers\n       Hostname: 'chat.freenode.net'\n       SSL: false // this doesn't work.  don't use it right now.\n       Port: 6667\n       Auto-Reconnect: true\n   SQL: // standard settings for connecting to an SQL database.\n       Username: root\n       Password: secret\n       IP: 127.0.0.1\n       Port: 3306\n       Database: irc\n       Table-Prefix: ircbutt\n```\n\n## Extensibility\n\nOn startup, the bot registers any command within the command package.\n\nYou can make your own commands, simply by implementing the Command interface.\n\nAn example of this is the following:\n\n```java\n/**\n * Handles the !echo functionality of the bot.\n */\npublic final class EchoCommand implements Command {\n\n    @Override\n    public BotResponse executeCommand(final IRCbutt butt, final GenericMessageEvent event, final String[] cmd) {\n        // A BotResponse requires the bot's intention, user (if applicable), and message.\n        // In this case, we are simply echoing out the arguments the user passed in.\n        return new BotResponse(BotIntention.CHAT, null, StringUtils.getArgs(cmd));\n    }\n\n    @Override\n    public ArrayList\u003cString\u003e getCommandAliases() {\n        // These are the command aliases that call the command.  You can have as many as you'd like.\n        return new ArrayList\u003c\u003e(Collections.singletonList(\"echo\"));\n    }\n\n    @Override\n    public boolean allowsCommandSubstitution() {\n        // true if command substitution is performed.  for echo, this makes sense.\n        // for something like a math expression, it wouldn't.\n        return true;\n    }\n}\n```\n\n## Special Thanks:\n\n- *BullShark* - for ideas, showing me buttbot, and the name 'buttbutt'\n- *Klong* - for tons of contributions and several commits\n- *ebolahats* - for being a rubber duck and for several commits\n- *MandL27* - for breaking the bot and pointing out what's annoying\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartenbach%2Fbuttbutt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartenbach%2Fbuttbutt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartenbach%2Fbuttbutt/lists"}