GithubHelp home page GithubHelp logo

valks-bots / partner-bot Goto Github PK

View Code? Open in Web Editor NEW
118.0 6.0 41.0 683 KB

Automates partnerships in the big community of discord.

License: MIT License

JavaScript 100.00%
discord discordjs discordjs-bot sql sqlite discord-bot discord-js discordbot bot javascript

partner-bot's Introduction

Quality Gate Status Lines of Code Bugs GitHub license

Partner bot is a discord bot that uses discord-js and sqlite to automate partnerships in the big community of discord. The bot sends your advert to every guild that has the bot setup with a configurable cooldown when you use the bump command. This bot has only been tested on a total of 4 servers, issues may arise if the bot has to handle 100 or more servers all sending messages between each other simultaneously. This project has been discontinued. If this bot was helpful to you consider giving me credit by linking back to my GitHub profile page.


Preview of Bump Message

Preview

Install on Windows

  1. Clone https://github.com/valkyrienyanko/partner-bot.git
  2. Download and install LTS Node.js
  3. Install yarn with npm i -g yarn
  4. Run yarn install in the project root directory
  5. Generate a bot token from the Discord Developers Portal
  6. Create a .env file in the src folder with the following content inside (BOT_TOKEN=BotTokenHere)
  7. Change ownerID in config.js to your user ID
  8. Start server with yarn start
  9. Create an invite link for the bot by grabbing its ID and putting it in the following URL https://discordapp.com/api/oauth2/authorize?client_id=YOUR_BOT_ID_HERE&scope=bot&permissions=27681
  10. Invite the bot to at least 2 unique guilds
  11. Continue setup with t!help

Install on Heroku

  1. Create a Heroku account.
  2. Create a new App from your Dashboard.
  3. Download the Heroku CLI.
  4. Open a terminal in your project and run heroku login.
  5. Create a Git remote using heroku git:remote -a <APP-NAME>.
  6. Create a file in your project called Procfile. (Must be in same folder as index.js)
  7. Insert worker:node index.js to the Procfile.
  8. Commit and push using git add . git commit -m "<Message>" git push heroku master

Install on Glitch

  1. Create an account on https://glitch.com
  2. Create new project -> import from GitHub -> https://github.com/Valks-Bots/partner-bot
  3. Click src folder dots icon to right -> create new file -> .env -> put BOT_TOKEN=BotTokenHere inside
  4. Change ownerID in config.js to your user ID
  5. Go to tools -> open up Terminal -> type npm start
  6. Create an invite link for the bot by grabbing its ID and putting it in the following URL https://discordapp.com/api/oauth2/authorize?client_id=YOUR_BOT_ID_HERE&scope=bot&permissions=27681
  7. Invite the bot to at least 2 unique guilds
  8. Continue setup with t!help

FAQ

Q: How do I increase the max description limit?
A: Edit the max_length config value in src/config.js

Q: I am getting this error in the console "TypeError: Cannot read property 'tag' of undefined", what do I do?
A: Edit the ownerID config value in src/config.js with your user ID.

Q: Every time I restart the bot, all the information I had setup has been wiped?
A: If you are using Heroku, Glitch or any other "free" online hosting service then it is highly likely that the service is deleting the bots database every 12 to 24 hours. If you host the bot on your local machine, you will not run into this problem.

partner-bot's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar greenkeeper[bot] avatar imbjdd avatar jaspermayone avatar liam31 avatar sayantan300 avatar valkyrienyanko 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

partner-bot's Issues

I'm Progamer ๐Ÿ˜Ž#3286

Hello valk,
Even though this might not be an issue, but our server was destroyed by some traitors, and they kicked everyone... So please join us back,
https://discord.gg/953XCpHbKF
The reason I had to create this since I never friended u nor u allow taking friend request.
Please let me know if u don't want to join.

Issue

When I try to bump a server, it is giving me an error. The ad has no emojis,links, or anything like that and is very short. How can I fix this?

help not working

(node:80888) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tag' of undefined
at Object.exports.run (/Users/juantan/Downloads/part/src/commands/utility/help.js:16:84)
at /Users/juantan/Downloads/part/src/events/message.js:40:11
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:80888) 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)

No modules folder

Hi, i dont have the module fomder required. And if i make one though, idk what to put in the loader file. Can you please help me?

Sending Twice

whenever i do t!help. or any command, sends the message twice

Database reset

Hello Devs,

Whenever I restart my bot, it says that I have to do the init command again. Do you know why?

Trash emoji help

How does one give the bot a trash emote ID to react with.

I can't seem to find anywhere to put an emoji ID, or if I need to add it in somewhere, what would it be called?
I even added emoteID with my own emoji ID in the config.js under the trash one in the Emoji tab thing and I still got the error and no reaction to said message.

help.

[Feature Request] Add emotes / roles without exceeding 1024 character limit

Message should display first x roles / emotes without exceeding the 1024 character limit whilst keeping track of all the characters in the roles / emotes / description among any other characters in the message.

For reference old emote display code.

{
    name: `Emojis: \`${message.guild.emojis.cache.size}\``,
    value: message.guild.emojis.cache.size === 0 ? 'No Emotes' : `${guildInfo.emojis.join(' ')}`,
    inline: false
}

New Command Ideas

Hello! I have thought of some new command ideas! They will be in a list:

  • Some Bot Owner Only Commands

- Utility Commands

Embed Customization

Hello,
Is there a way we can customize the embeds a little bit more? I want to add color and titles.

bump command returns an error

As I spoke to you via Email...
The bot has Admin Perms and all variables are entered correctly still the same error occurs that says it didn't find the channel.

Exceeding 1024 Discord Character Limit + Rounding Tweak

Emotes

If server has too many emotes, the advertisement message will be too big for discord to display as a message as it will exceed the 1024 character limit.

{
name: `Emojis: \`${message.guild.emojis.cache.size}\``,
value: message.guild.emojis.cache.size === 0 ? 'No Emotes' : `${guildInfo.emojis.join(' ')}`,
inline: false
}

Fix: Add conditional here. "If emotes > some number then only display first x, otherwise display all emotes"

Rounding

Following code displays ALL the decimals, could be rounded with Math.round()

value: `Online: \`${guildInfo.online}\` | Idle: \`${guildInfo.idle}\` | DnD: \`${guildInfo.dnd}\``,

Server Stats Not Correct

When looking at someones ad, it will say

##% humans ##% bots

And it is incorrect because my server has way more users then bots and the bot percent was still higher then users.

Blacklist Feature

Hello, I think it would be cool to have a blacklist.

So if we want to ban someone from using our bot, we can do that.

Channel error

Hello when I host bot for 24h after 1day or 2 days all setups rest like channel and description
Can you help me how to fix it I host on heroku

Bot Crashing when bumping

When I bump the bot it wont push the ad and the ad is short and has no emojis! How do I fix this? It also will show an error in the console

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.