Giter Club home page Giter Club logo

discord.js-meme's Introduction

discord.js-meme's People

Contributors

dependabot[bot] avatar elchologamer 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

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

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

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.

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.