{"id":15213072,"url":"https://github.com/romozz/reddit-discord-image","last_synced_at":"2026-03-08T09:33:05.196Z","repository":{"id":59145084,"uuid":"532398985","full_name":"Romozz/reddit-discord-image","owner":"Romozz","description":"Random subreddit image in discord","archived":false,"fork":false,"pushed_at":"2022-10-11T09:44:40.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T21:44:33.427Z","etag":null,"topics":["discord","discord-js","node","nodejs","npm-package","reddit","reddit-api"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/reddit-discord-image","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Romozz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-03T23:53:57.000Z","updated_at":"2022-09-04T01:23:20.000Z","dependencies_parsed_at":"2023-01-19T20:46:48.557Z","dependency_job_id":null,"html_url":"https://github.com/Romozz/reddit-discord-image","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romozz%2Freddit-discord-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romozz%2Freddit-discord-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romozz%2Freddit-discord-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romozz%2Freddit-discord-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Romozz","download_url":"https://codeload.github.com/Romozz/reddit-discord-image/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243012662,"owners_count":20221606,"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":["discord","discord-js","node","nodejs","npm-package","reddit","reddit-api"],"created_at":"2024-09-28T09:20:44.196Z","updated_at":"2026-03-08T09:33:05.147Z","avatar_url":"https://github.com/Romozz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/reddit-discord-image\"\u003e\u003cimg src=\"https://badgen.net/npm/v/reddit-discord-image\" alt=\"Npm package version\"\u003e\u003c/a\u003e\u003ca href=\"https://www.npmjs.com/package/reddit-discord-image\"\u003e\u003cimg src=\"https://badgen.net/npm/dt/reddit-discord-image\" alt=\"Npm package total downloads\"\u003e\u003c/a\u003e\n\n\u003c/p\u003e\n\n# Installation\n**Node.js 16.6.0 or newer is required**\n\n```bash\n$ npm install reddit-discord-image\n```\n\n## MessageCreate v13\n\n```js\nconst { RedditImage } = require('../dist') // write reddit-discord-image instead ../dist\nconst { Client, Intents } = require('discord.js')\nconst client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] })\nconst reddit = new RedditImage()\n\nclient.on('messageCreate', async message =\u003e {\n    if (message.content.startsWith('!reddit')) {\n        const args = message.content.split(' ').splice(1)\n        await reddit.fetch({\n            reddit: args[0], // (required) subreddit name to find pictures\n            limit: 1000, // (optional) the number of pictures among which you will get 1 random one\n            sort: 'new', // (optional) a rather useless option, because the pictures are given out randomly\n            time: 'week' // (optional) how old are the pictures you want to get\n        })\n        message.channel.send({ embeds: [reddit] })\n    }\n})\n\nclient.login(token)\n```\n\n# Interaction v13\n\nYou can view interaction example at this \u003ca href=\"https://github.com/Romozz/reddit-discord-image/blob/main/examples/interaction.js\"\u003elink\u003c/a\u003e\n\n### More examples in \u003ca href=\"https://github.com/Romozz/reddit-discord-image/tree/main/examples\"\u003eexamples\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromozz%2Freddit-discord-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromozz%2Freddit-discord-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromozz%2Freddit-discord-image/lists"}