Coder Social home page Coder Social logo

p0ryae / discord.js-meme Goto Github PK

View Code? Open in Web Editor NEW
53.0 3.0 31.0 57 KB

Generate Popular memes! As good as Dank Memer bot itself ๐Ÿธ

Home Page: http://youtube.com/DashCruft

JavaScript 100.00%
meme meme-generator memes discord-meme-bot dankmemes dank-memer reddit

discord.js-meme's Introduction

Generate Popular memes! As good as Dank Memer bot itself ๐Ÿธ

๐Ÿ“• Requirement

We will be using got in this repo, which is a nice Human-friendly and powerful HTTP request library for Node.js
To install all of the dependencies, simply run the command below in the cloned project:

npm install

To check what all the dependencies are, take a look at package.json's dependencies field.

๐Ÿ“— How to use?

This repository is fully developed and Includes a whole discord bot. If you're looking for the command itself, Navigate through commands/meme.js and use get the code included inside of the module.exports.run. You can also clone this repository if you want and just replace the token in index.js.

๐Ÿ› You found an issue or a Bug?

No worries! You can just create a pull request or a new issue as you can see on the top of the repository. You can also join our Support Discord Server if you need help with coding this or coding Discord bots in general

discord.js-meme's People

Contributors

dependabot[bot] avatar grazen0 avatar notzer0two avatar p0ryae avatar pythoncoderas avatar tryka-1213 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

discord.js-meme's Issues

npm audit reports 3 vulnerabilities

The packages are out of date, and those versions have vulnerabilities which make npm audit complain. The best idea is to upgrade the versions using Dependabot. I'll add a PR for enabling dependabot.

TypeError: undefined is not a function

I'm using TypeScript for my bot and everything was working fine in the meme command. I used to code given in the meme command. I wanted to make a cat command with similar code so instead of adding the URL https://www.reddit.com/r/memes/random/.json i added https://www.reddit.com/r/cats/random/.json but I'm getting the error, TypeError: undefined is not a function on the function got('https://www.reddit.com/r/cats/random/.json').

Here is the code-

module.exports = {
	name: 'cat',
	description: 'Sends a cat',

	execute(message: any, args: any, embedFooter: string) {
		const got = require('got');

		const { MessageEmbed } = require('discord.js');
		const embed = new MessageEmbed();

		got('https://www.reddit.com/r/cats/random/.json')
			.then((response: { body: string }) => {
				const [list] = JSON.parse(response.body);
				const [post] = list.data.children;

				const permalink = post.data.permalink;
				const memeUrl = `https://reddit.com${permalink}`;
				const memeImage = post.data.url;
				const memeTitle = post.data.title;
				const memeUpvotes = post.data.ups;
				const memeNumComments = post.data.num_comments;

				embed.setTitle(`${memeTitle}`);
				embed.setURL(`${memeUrl}`);
				embed.setColor('RANDOM');
				embed.setImage(memeImage);
				embed.setFooter(`๐Ÿ‘ ${memeUpvotes} ๐Ÿ’ฌ ${memeNumComments}`);

				message.channel.send(embed);
			})
			.catch(console.error);
	},
};

Dummy fs dependency being used

The fs module is a Security holding package, and does nothing.

This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.

The module can be safety removed from the dependencies.

The package.json of the module is also empty, consisting of: https://github.com/npm/security-holder/blob/76509043e0f9a021e14b71c067c177fb950b1b5c/package.json#L1-L6

Bot Isn't Working

Hey,The Bot isnt working when i open it on replit and input a secret (the token of my bot) and click on run i get it this issue

๎บง npm start
npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2022-06-11T14_52_55_432Z-debug.log
exit status 1

Please help me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.