Giter VIP home page Giter VIP logo

karmabot's Introduction

Note : The source code of the bot is outdated as I'm not working on the bot currently. This repository will remain archived.

Karma

KarmaBot โœจ

Run on Repl.it Stars License

A Multipurpose Discord Bot with a Music System used by 200K+ users and more than 2000 servers.

Karma Bot is an open source Discord bot coded in JavaScript with Discord.js by DeltaCoderr.

Categories ๐Ÿ“‘

  • Music & Filter
  • Fun
  • Anime
  • Buttons
  • NSFW
  • Utility
  • Image
  • ChatBot

Commands List ๐Ÿ’ซ

Karma has a lot of features, with 8 main categories:

  • ๐ŸŽต Music: play, skip, queue, np,filters and 10 more!
  • ๐Ÿ‘ฉโ€๐Ÿ’ผ Information: info, help, invite and 2 more!
  • ๐Ÿš“ Anime: anime, hug, karma, neko and 11 more!
  • ๐Ÿ”ฒ Buttons : snake, and 1 more!
  • ๐Ÿค– ChatBot: chatbot and 2 more!
  • ๐Ÿ‘ป Fun: binary, clyde, comment, eject, iq, reddit and 8 more!
  • ๐Ÿ–จ๏ธ Image: fire, respect, scary, triggered and 5 more!
  • โœ‰๏ธ Other: profile, addemoji, snipe, wiki and 3 more!
  • ๐Ÿ‘‘ Owner: eval, reload

Status ๐Ÿ“ฅ

Status Servers Upvotes Owner

Invite the Bot ๐Ÿ’•

Karma Bot

Support Server ๐Ÿท๏ธ



Installation

The Installation guide can be found in the Installation.md file.

License ยฉ๏ธ

Karma Bot is licensed under the GPL 3.0 license. See the file LICENSE for more information. If you plan to use any part of this source code in your own bot, I would be grateful if you would include some form of credit somewhere.

โœจ Contributors :

PRs Welcomeย 

Thanks goes to these wonderful people :


DeltaCoderr

๐Ÿ‘‘

Madnesssik

๐ŸŽต

Zayynee

๐Ÿ’ป

PartMan

๐Ÿ’ป

karmabot's People

Contributors

0xjaskeerat avatar deltacoderr avatar dependabot[bot] avatar dhanushnehru avatar discordanaxes avatar gonzyui avatar korak-sengupta avatar notkyoyo avatar partman7 avatar sachinl0har avatar srnightmare09 avatar sujalgoel avatar xsaiian avatar zayynee avatar zekeazrail 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  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  avatar  avatar  avatar  avatar

karmabot's Issues

[NSFW] Need new NSFW API

As the API Karma Bot was using for NSFW was Nekos.life, and It seems that API returns Images of Minors which are against Discord TOS
So, I've had to remove them forcefully as it could be a trouble If I kept using them
If you have any new NSFW API's that aren't against Discord TOS. Feel free to Drop a Comment about it!

im getting mongodb error on replit , anyone can help me ?

hey guys
i have a problem :((
when i use chatbot
and type &setchatbotchannel #txt-channel-id
bot respond to me : ChatBot Channel has been Set Successfully

and then im just speaking to bot
but But bot does not answer me
and i see error in console repl :
(node:46) UnhandledPromiseRejectionWarning: TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters at new ClientRequest (_http_client.js:151:13) at request (https.js:313:10) at /home/runner/KarmaBot/node_modules/node-fetch/lib/index.js:1438:15 at new Promise (<anonymous>) at fetch (/home/runner/KarmaBot/node_modules/node-fetch/lib/index.js:1407:9) at Client.<anonymous> (/home/runner/KarmaBot/index.js:62:5) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ...to show where the warning was created) (node:46) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:46) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:46) UnhandledPromiseRejectionWarning: TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters at new ClientRequest (_http_client.js:151:13) at request (https.js:313:10) at /home/runner/KarmaBot/node_modules/node-fetch/lib/index.js:1438:15 at new Promise (<anonymous>) at fetch (/home/runner/KarmaBot/node_modules/node-fetch/lib/index.js:1407:9) at Client.<anonymous> (/home/runner/KarmaBot/index.js:62:5) at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:46) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) (node:46) UnhandledPromiseRejectionWarning: TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters at new ClientRequest (_http_client.js:151:13) at request (https.js:313:10) at /home/runner/KarmaBot/node_modules/node-fetch/lib/index.js:1438:15 at new Promise (<anonymous>) at fetch (/home/runner/KarmaBot/node_modules/node-fetch/lib/index.js:1407:9) at Client.<anonymous> (/home/runner/KarmaBot/index.js:62:5) at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:46) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

what should i do now ?

Errors

Im completely noob on this bot concept when i do npm i my quick.db shows alot of error.Can you gib me a duplicate of ur files ur using like with node_module and everything just like i need to add token and apis and start the bot
Ik its stupid question but please and thanks

[4.0.0] - Discord.js v13 Refactor

Since Discord.js v13 is out. I'll probably update the bot to v13 as well, as it brings in the implementation of Buttons and Slash Commands.

I made a separate branch for Djs-v13 so all the PRS will go in that branch and once approved, will be merged in the branch with the release of the 4.0.0 version

  • The branch is Here
  • Updating from V12 to V13 guide can be found Here

Need moderation and automod

Can you make like good moderation commands,lock channel and unlock channel and serverlock and server unlock & CAN U MAKE LIKE AUTO REDDIT POSTING? & finally some basic automod if u can? Other then that epic bot ๐Ÿ˜๐Ÿคฉ

Solution to dev-branch's ban.js command

Hey there! I found out that your ban.js has a lot of errors on it, but however, I managed to fix it up and it should have very little (or no) problems. If it does, just reply and I'll try to fix it

Also, this is mainly part of your bot, and because of that, I will be adding your credit on my GitHub repo and the bot itself (yes, it would have changes but I'll try not to hurt your copyright lol)

Here is the code btw:
const { MessageEmbed } = require('discord.js');
const config = require('../../configs/config.json');

module.exports = {
config: {
name: 'ban',
description: 'Ban a member from your server!',
usage: '<@user> [reason]',
accessableby: "Moderators",
category: "Moderation",
},
run: async (client, message, args) => { if(!message.guild.me.hasPermission("BAN_MEMBERS")) return message.reply('I don\'t have the ban members permission.') if(!message.member.hasPermission("BAN_MEMBERS")) return message.reply('You don\'t have the ban members permission.')

        const noargs = new MessageEmbed()
        .addField("Error!", "```diff\n- You didn\'t mention a user.```")
        .addField("Usage", `\`\`\`diff\n+ ${config.prefix}ban [user] (reason)\`\`\``)
        .setColor(config.embedcolor)
        if (!args[0]) return message.channel.send(noargs) 

        let banMember = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args[0].toLocaleLowerCase()) || message.guild.members.cache.find(ro => ro.displayName.toLowerCase() === args[0].toLocaleLowerCase());

        const nomember = new MessageEmbed()
        .addField("Error!", "```diff\n- I couldn't find that user.```")
        .addField("Try", "```diff\n+ Check if that user is in this server, and rerun the command again.```")
        .setColor(config.embedcolor)

        const selfban = new MessageEmbed()
        .addField("Error!", "```diff\n- You can't ban yourself!```")
        .addField("Try", "```diff\n+ I do NOT allow the use of selfharm!```")
        .setColor(config.embedcolor)
        if (!banMember) return message.channel.send(nomember);
        if (banMember === message.member) return message.channel.send(selfban)

        var reason = args.slice(1).join(" ");

const unbannable = new MessageEmbed() .addField("Error!", "```diff\n- Nice try!```") .addField("Try", "```diff\n+ You can't ban a user with a role that's higher then you!```") .setColor(config.embedcolor)

        if (!banMember.bannable) return message.channel.send(unbannable)
        try {

            const userbanned = new MessageEmbed()
        .addField("Banned!", `\`\`\`diff\n- You got banned from ${message.guild.name}!\`\`\``)
        .addField("Reason", `\`\`\`diff\n+ ${reason || "None."}!\`\`\``)
        .addField("Moderator", `\`\`\`diff\n+ ${message.author.tag}!\`\`\``)
        .setColor(config.embedcolor)
        banMember.send(userbanned).then(() =>
            message.guild.members.ban(banMember, { days: 7, reason: reason })).catch(() => null)
        } catch {
            message.guild.members.ban(banMember, { days: 7, reason: reason })
        }
        if (reason) {
        var sembed = new MessageEmbed()
           .addField("Success!", `\`\`\`diff\n+ ${banMember.user.tag} - [${banMember.user.id}] was banned\`\`\``)
           .addField("Reason", `\`\`\`diff\n+ ${reason || "None."}!\`\`\``)
        .setColor(config.embedcolor)
        message.channel.send(sembed)
        } else {
            var sembed2 = new MessageEmbed()
          .addField("Success!", `\`\`\`diff\n+ ${banMember.user.tag} - [${banMember.user.id}] was banned\`\`\``)
        .setColor(config.embedcolor)
        message.channel.send(sembed2)
        }
}}`

I also made a kick.js command from the ban.js, but replaced it all with kick stuff. I hope you enjoy <3

Index.js

Sir it is asking index.js file to be made to run

Module discord.js error

Error module discord.js

Info :

Node version : v15.13.0
npm version : 7.7.6

Logs :

[email protected]: /home/debian/Bots/BotPrincipal/KarmaBot# node karma.js
node:internal/modules/cjs/loader:927
throw err;
^

Error: Cannot find module 'discord.js'
Require stack:

  • /home/debian/Bots/BotPrincipal/KarmaBot/karma.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object. (/home/debian/Bots/BotPrincipal/KarmaBot/karma.js:3:17)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/home/debian/Bots/BotPrincipal/KarmaBot/karma.js' ]
    }

To install modules :

[email protected]: /home/debian/Bots/BotPrincipal/KarmaBot# npm i
npm ERR! code 1
npm ERR! path /home/debian/Bots/BotPrincipal/KarmaBot/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/debian/Bots/BotPrincipal/KarmaBot/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/debian/Bots/BotPrincipal/KarmaBot/node_modules/@discordjs/opus/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/debian/Bots/BotPrincipal/KarmaBot/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/15.13.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/15.13.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/debian/Bots/BotPrincipal/KarmaBot/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/15.13.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/debian/Bots/BotPrincipal/KarmaBot/node_modules/@discordjs/opus',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/home/debian/Bots/BotPrincipal/KarmaBot/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 4.19.0-16-cloud-amd64
npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/debian/Bots/BotPrincipal/KarmaBot/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/debian/Bots/BotPrincipal/KarmaBot/node_modules/@discordjs/opus
npm ERR! gyp ERR! node -v v15.13.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

[Djs-v14] Complete rewrite

All the new changes will be done in this branch

Since Karma uses v12 for now, I'm thinking to switch to slash commands so it would be beneficial for users to use the commands more efficiently.

Any PR'S are welcome.

Request to add CODE_OF_CONDUCT to the repo

@DeltaCoderr
I have opened this issue in reference to the issue no #93

For writing a meaningful github action , i need a CODE_OF_CONDUCT.md file which is currently lacking from the repository
Can you please assign this issue to me so that I can add the CODE_OF_CONDUCT.md file first and then more further to write a meaningful github action for the repository

i am getting this error and idk what to do

/home/runner/KarmaBot/node_modules/youtube-sr/build/main.js:69
url: item.channel.thumbnails?.default.url,
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/runner/KarmaBot/node_modules/discord-player/src/Player.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/runner/KarmaBot/node_modules/discord-player/index.js:5:13)
at Module._compile (internal/modules/cjs/loader.js:999:30)
exit status 1

Bot start error

Whenever I try to start the bot it gives me the error saying ```๎บง node karma.js
/home/runner/KarmaBot/node_modules/youtube-sr/build/main.js:69
url: item.channel.thumbnails?.default.url,
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/runner/KarmaBot/node_modules/discord-player/src/Player.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/runner/KarmaBot/node_modules/discord-player/index.js:5:13)
at Module._compile (internal/modules/cjs/loader.js:999:30)
exit status 1```

Request to add a github action

Feature request :
KarmaBot is an awesome and an engaging repository , plus due to hacktoberfest'21 many open source enthusiasts ( preferably students who are first time contributors ) open issues and PRs which eventually help repo to grow
I think there should be a github action to welcome contributors on their each issue and PR so as to make repository more interactive

If you love the idea , please assign this to me

More features

Can we discuss some more features that we all can add?
like do u have a discord server where we can discuss this?

Suggestion

Make help command using buttons use slider npm

Error discord.js

Error module discord.js

KarmaBot# node karma.js
node:internal/modules/cjs/loader:927
throw err;
^

Error: Cannot find module 'discord.js'
Require stack:

  • /home/debian/Bots/BotPrincipal/KarmaBot/karma.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object. (/home/debian/Bots/BotPrincipal/KarmaBot/karma.js:3:17)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/home/debian/Bots/BotPrincipal/KarmaBot/karma.js' ]
    }

Api help

Idk where to get api ny google console is not working it keeps buffering

hostings

can i host this bot on heroku

Problem with setChatbotchannel command.

Hey, so i aslo had a chatbot api and stuff, thats why i searched for a way to do it for multiple servers, and now i found yours, which i then modified. Its just telling me now, that its not a valid channel or doesnt has enough perms. That is not the case tho, cuz it has admin perms and its a normal text channel. Modified code : here The error with command and valid channel + perms here

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.