3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00
dbot/modules/imgur
2013-06-01 16:16:24 +00:00
..
config.json new outputprefixes 2013-05-22 17:37:07 +00:00
imgur.js improve imgur linkhandler efficiency by using only one callback and link name feature [#475] 2013-05-26 17:19:25 +00:00
pages.js Don't shit out if there's no highscore quote category 2013-04-19 17:06:19 +00:00
README.md update docs for imgur with web routes [#445] and config options [#352] 2013-05-19 10:48:24 +00:00
strings.json German translations 2013-06-01 16:16:24 +00:00

imgur

Various imgur functionality.

Description

Posts information on imgur links which are pasted into the channel and provides functionality to generate a random imgur link.

Config

imagelength: 5

Length of slugs generated by the random imgur functionality.

nsfwwarn: true

Warn that images generated by the ~ri command may be NSFW.

apikey

Key to use with the imgur API.

highscore: ricount

Quote category to use for a highscore; used to run games with the web /random page, by storing a highscore based on some arbitrary rule in the chosen quote category (say, how far can you get before seeing a turtle). Then, on the imgur random page you can press c to see a countdown towards the last stored value in the highscore quote category. If you beat the highscore, simply add the winning score to the quote category.

Commands

~ri

Generate a random imgur image and post a link to it in the channel.

API

getRandomImage(callback)

Generate a random imgur image by generating random slugs and then testing for their existence until it finds one which exists (and hasnt been deleted). Callback is given with two parameters, the URL of the generated image, and the slug for the generated image.

getImageInfoString(slug, callback)

Return a string containing info about the image with the given slug from the imgur API. Callback is called with one argument, the info string.

getImageInfo(slug, callback)

Return data from the imgur API on an image with the given slug. Callback is called with one argument, the information returned by the API.

Web

/imgur/random

A web page which loads a random image from imgur. You can press the space bar to load a new image, and information about the images are shown on the top-left of the page. You can press c to view a highscore count (as documented above).

/imgur/stats

Show statistics on the total use of the imgur module.

Hooks

Posts information about an imgur link when one is linked in the channel.