diff --git a/docs/api/modules/calc.rst b/docs/api/modules/calc.rst index 6e8247f..392e08e 100644 --- a/docs/api/modules/calc.rst +++ b/docs/api/modules/calc.rst @@ -4,10 +4,21 @@ Commands -------- - - *calc* - returns a random fact - - *calc something = some definition* - add a fact - - *calc something =* - delete a fact - - *match keyword* - search facts +.. cmdoption:: calc + + Returns a random fact + +.. cmdoption:: calc = + + Add a fact + +.. cmdoption:: calc = + + Delete a fact + +.. cmdoption:: match + + Search facts Class Reference --------------- diff --git a/docs/api/modules/cardsagainsthumanity.rst b/docs/api/modules/cardsagainsthumanity.rst index 40451e4..2711050 100644 --- a/docs/api/modules/cardsagainsthumanity.rst +++ b/docs/api/modules/cardsagainsthumanity.rst @@ -1,6 +1,30 @@ :mod:`CardsAgainstHumanity` --- CaH in IRC ========================================== +IRC based Cards Against Humanity clone. Requires "black card" messages to be +placed in file named ``questions.txt`` in the data dir, and "white card" messages +in a file named ``answers.txt``. + +Commands +-------- + +.. cmdoption:: .joinGame + + If the game hasn't started yet, join the lobby + +.. cmdoption:: .ready + + The game will start when all players are ready; this indicates a player is + ready + +.. cmdoption:: .pick [] ... + + If the player is not the card czar, play one or more cards from their hand + +.. cmdoption:: .choose + + If a player is the card czar, choose the winning card number + Class Reference --------------- diff --git a/docs/api/modules/cryptowallet.rst b/docs/api/modules/cryptowallet.rst index 90de775..48b6565 100644 --- a/docs/api/modules/cryptowallet.rst +++ b/docs/api/modules/cryptowallet.rst @@ -3,6 +3,62 @@ Module to provide a multi-type cryptocurrency wallet +Config +------ + +.. code-block:: json + + { + "types": { + "BTC": { + "name": "Bitcoin", + "abbr": "BTC", + "host": "192.168.1.210", + "username": "bobby", + "password": "propane", + "port": 8332, + "precision": 8, + "reserve": 0.0005, + "link": "https://bitcoin.org/" + } + } + } + +.. cmdoption:: types + + Dictionary of supported crypto currencies, keyed abbreviation => detail. All fields required. + +.. cmdoption:: types.TYPE.precision + + Number of decimal places the currency supports + +.. cmdoption:: types.TYPE.reserve: + + Minimum balance; this is to cover tx fees + +Commands +-------- + +.. cmdoption:: .curinfo [] + + See list of supported currencies, or info about a specific one. + +.. cmdoption:: .getbal + + Get current user's balance of a specific currency + +.. cmdoption:: .setaddr
+ + Set current user's withdrawal address for to
+ +.. cmdoption:: .withdraw + + Request a withdrawal of to current user's withdraw address of + +.. cmdoption:: .getaddr + + Get deposit address for + Class Reference --------------- diff --git a/docs/api/modules/dogedice.rst b/docs/api/modules/dogedice.rst index 9c78c91..167e304 100644 --- a/docs/api/modules/dogedice.rst +++ b/docs/api/modules/dogedice.rst @@ -3,6 +3,38 @@ Module to provide a game for gambling Dogecoin +.. code-block:: json + + { + "minBet": 0.01, + "lobbyIdleSeconds": 15, + "channelWhitelistOn": true, + "channelWhitelist": [ + "dogegamestest", + "test" + ] + } + +.. cmdoption:: lobbyIdleSeconds + + When more than 1 player has joined, the game will start after this many + seconds + +Commands +-------- + +.. cmdoption:: .join + + Join the current round and bet dogecoins + +.. cmdoption:: .leave + + Leave the current round. + +.. cmdoption:: .roll + + Once the game has started, roll the dice + Class Reference --------------- diff --git a/docs/api/modules/dogewallet.rst b/docs/api/modules/dogewallet.rst index bf488e5..8ddd847 100644 --- a/docs/api/modules/dogewallet.rst +++ b/docs/api/modules/dogewallet.rst @@ -1,7 +1,42 @@ :mod:`DogeWallet` --- A Dogecoin wallet ======================================= -This module provides a dogecoin wallet hosted on the IRC bot's server +This module provides a dogecoin wallet hosted on the IRC bot's server. Using +:doc:`CryptoWallet ` instead is reccommended, this +has many command conflicts with newer modules. + +Commands +-------- + +.. cmdoption:: .setpass (| ) + + Create account or change password if account already exists. "Trust" is + based on user's hostname. + +.. cmdoption:: .login + + Log into the bot (just this module) + +.. cmdoption:: .logout + + Log out + +.. cmdoption:: .setdogeaddr
+ + Set withdrawal address for current user + +.. cmdoption:: .getdogebal + + Get current user's balance + +.. cmdoption:: .withdrawdoge + + With the right , withdraw to current user's withdrawal + address + +.. cmdoption:: .getdepositaddr + + Get current user's withdrawal address Class Reference --------------- diff --git a/docs/api/modules/inventory.rst b/docs/api/modules/inventory.rst index c49d738..df12dc8 100644 --- a/docs/api/modules/inventory.rst +++ b/docs/api/modules/inventory.rst @@ -4,8 +4,13 @@ Commands -------- - - *botnick: inventory* - print current inventory - - *botnick: have a x* - give the bot an item +.. cmdoption:: botnick: inventory + + Print current inventory + +.. cmdoption:: botnick: have a + + Give the bot an item Class Reference --------------- diff --git a/docs/api/modules/linktitler.rst b/docs/api/modules/linktitler.rst index 18d0a91..e974e6d 100644 --- a/docs/api/modules/linktitler.rst +++ b/docs/api/modules/linktitler.rst @@ -1,5 +1,15 @@ -:mod:`LinkTitler` --- Fetch page titles for URLs posted in chat -=============================================================== +:mod:`LinkTitler` --- Fetch url information +=========================================== + +Grabs titles and other info of links posted into the channel. + +Supported services: + +* Youtube +* Reddit + +Other URLs will grab the element for html pages, or Content-Type header +and length for any other kind of file. Class Reference --------------- diff --git a/docs/api/modules/randquote.rst b/docs/api/modules/randquote.rst index 85a44f4..6817cb4 100644 --- a/docs/api/modules/randquote.rst +++ b/docs/api/modules/randquote.rst @@ -4,7 +4,10 @@ Commands -------- - - *.randomquote .randquote .rq* - fetch and say a random quote +.. cmdoption:: .rq +.. cmdoption:: .randquote + + fetch and say a random quote Class Reference --------------- diff --git a/docs/api/modules/remind.rst b/docs/api/modules/remind.rst index b936a23..1cd4067 100644 --- a/docs/api/modules/remind.rst +++ b/docs/api/modules/remind.rst @@ -4,10 +4,17 @@ Commands -------- - - *.at <time>* - remind at a specific time. - Example: *.at 20:45EST Do your homework!* - - *.in <time>* - Remind after an amount of time. - Example: *.in 1week5d2h1m Go fuck yourself* +.. cmdoption:: .at <time> + + Remind at a specific time. + + Example: ``.at 20:45EST Do your homework!`` + +.. cmdoption:: .in <time> + + Remind after an amount of time. + + Example: ``.in 1week5d2h1m Go fuck yourself`` Class Reference --------------- diff --git a/docs/api/modules/seen.rst b/docs/api/modules/seen.rst index d0492b6..39d9a48 100644 --- a/docs/api/modules/seen.rst +++ b/docs/api/modules/seen.rst @@ -1,10 +1,14 @@ :mod:`Seen` --- !seen <username> ================================ +Tracks when nicks were last seen online. + Commands -------- - - *!seen <username>* - finds the last time <username> was online +.. cmdoption:: !seen <username> + + Finds the last time <username> was online Class Reference --------------- diff --git a/docs/api/modules/tell.rst b/docs/api/modules/tell.rst index 3f39bbe..1abc976 100644 --- a/docs/api/modules/tell.rst +++ b/docs/api/modules/tell.rst @@ -1,11 +1,14 @@ -:mod:`Tell` --- Pass messages to a user when they're next seen -============================================================== +:mod:`Tell` --- Message passer +============================== + +Queue messages to pass a user when they're next seen. Commands -------- - - *.tell <user> <message>* - When <user> is next seen online, they will be - a PM with <message>. +.. cmdoption:: .tell <user> <message> + + When <user> is next seen online, they will be sent a PM with <message>. Class Reference --------------- diff --git a/docs/api/modules/urban.rst b/docs/api/modules/urban.rst index a60a78d..c76a72e 100644 --- a/docs/api/modules/urban.rst +++ b/docs/api/modules/urban.rst @@ -4,7 +4,9 @@ Commands -------- - - *.urban* - fetch a random fact from Urban Dictionary +.. cmdoption:: .urban + + fetch a random fact from Urban Dictionary Class Reference --------------- diff --git a/docs/api/modules/weather.rst b/docs/api/modules/weather.rst index b8a3908..0ad93a6 100644 --- a/docs/api/modules/weather.rst +++ b/docs/api/modules/weather.rst @@ -4,13 +4,26 @@ Commands -------- - - *.weather <location>*, *.w <location>* - fetch weather for a locaiton. If no location is passed, the user's preferred location will be used. - Example: *.w 95051* - - *.setloc <location>* - set your preferred location - Example: *.setloc Rochester, NY* - *.setloc 14623* - - *.wunit <type>* - set your preference between fahrenheit or celsius. - Example: *.setloc F* +.. cmdoption:: .weather <location> +.. cmdoption:: .w <location> + + Fetch weather for a location. If no location is passed, the user's + preferred location will be used. + + Example: ``.w 95051`` + +.. cmdoption:: .setloc <location> + + Set your preferred location + + Example: ``.setloc Rochester, NY``, ``.setloc 14623`` + + +.. cmdoption:: .wunit <type> + + Set your preference between fahrenheit or celsius. + + Example: ``.setloc F`` Class Reference --------------- diff --git a/docs/api/modules/youtube.rst b/docs/api/modules/youtube.rst index 9ab8d67..979cc93 100644 --- a/docs/api/modules/youtube.rst +++ b/docs/api/modules/youtube.rst @@ -4,8 +4,12 @@ Commands -------- - - *.youtube <query>*, *.yt <query>* - search youtube for keywords <query> - Example: *.yt cute cats* +.. cmdoption:: .youtube <query> +.. cmdoption:: .yt <query> + + Search youtube for keywords <query> + + Example: ``.yt cute cats`` Class Reference --------------- diff --git a/pyircbot/modules/DogeDice.py b/pyircbot/modules/DogeDice.py index d3da0b1..4990a70 100755 --- a/pyircbot/modules/DogeDice.py +++ b/pyircbot/modules/DogeDice.py @@ -261,6 +261,7 @@ class gameObj: def gamePlayTimeoutExpired(self): # Time out - return doges self.master.bot.act_PRIVMSG(self.channel, "Time expired! Returning all doges.") + # TODO: Option beteen this and user surrenders their coins on timeout if self.step == 3: # In game step. Refund doges for player in self.players: