GithubHelp home page GithubHelp logo

antares-network / antaresbot Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 9.86 MB

A small bot with a hodgepodge of features and cool commands. Have fun with it :P

Home Page: https://bot.antaresnetwork.com/

License: Other

TypeScript 99.80% Procfile 0.02% Dockerfile 0.18%
antares antaresbot bot discord discord-bot discord-js meme-bot memes nodejs reddit-bot typescript

antaresbot's People

Contributors

deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar nathen418 avatar stickyfingies avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

fortuneman1

antaresbot's Issues

(JS-0349) Unnecessary type assertion of an expression

Description

Type assertion is explicitly telling the compiler that we want to treat the entity as a different type but if we add a type assertion for a variable which automatically treats the variable with the same type then it is unnecessary to define type. Using a type assertion that does …

Occurrences

There are 3 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Antares-Network/AntaresBot/issue/JS-0349/occurrences/

Error: No update found

guildUpdate does not have a full list of guild changes and spits out a spam of Error: No update found

Condition 'guildBan.banUser(user)' is always true

Condition guildBan.banUser(user) is always true because it evaluates to a 'Promise' object. The value of expression guildBan.banUser(user) is originated from the return value of banUser() defined at line 5 of actions/guildBan.js.

    run(message, { user }) {
        if (guildBan.banUser(user)) {
            //if the user was banned respond with this

(JS-0009) Found empty block statements

Description

Empty block statements, while not technically errors, usually occur due to refactoring that wasn't completed. They can cause confusion when reading code and add unnecessary lines to the codebase. Example - The not-preferred way :

if (foo) { } while (foo) { } switch(foo) { } try { doSomething(); 

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Antares-Network/AntaresBot/issue/JS-0009/occurrences/

add ban checking to counting

currently, those people banned from using the bot can still participate in the counting channels of those guilds that have set them up

Make restart.js restart the ENTIRE node app

I'm looking for a way to completely restart the entire NodeJs app from within the bot's code.
I want the js to do the equivalent of ctrl+c and then npm start but it needs to happen from within the js code of my bot.

What is there right now currently just signs in and out of the discord api/destroyes the old client and creates a new one

        message.channel.send('Restarting...');
        console.log('\n\n\n\n\n\n\n\n')
        bot.destroy();
        console.log("Signed out of the Discord API".red.bold);
        bot.login(process.env.BOT_TOKEN).catch(e => console.error(e));
        console.log('Trying to login to the Discord API\nPlease wait for a connection'.yellow);
        onReady.event(bot);
        console.log("Logged into the Discord API".green.bold);
        console.log("Startup script has run".red.bold);
        logToConsole.command(message.guild, message);

Replace all static bot logos with dynamic link

replace https://antaresnetwork.com/resources/icon.png in embeds, etc when the bot icon is needed, with https://cdn.discordapp.com/avatars/${client.user?.id}/${client.user?.avatar}.jpeg

botbanguild

botbanguild does not display the correct message when banning a guild from using the bot

add music support

add music option from Spotify and or last.fm and or SoundCloud or something

permission errors (catch)

add something like

.catch((err) => { channel.send("Error")});

to each message send instance, or find a way to handle errors better

ChannelCheck has too much redundant code

Redundant code needs to be cleaned up in ChannelCheck.js
It needs to be simplified if at all possible

Example:

        //check if the user has been banned from using the bot 
        if (gate.BANNED_USERS.includes(messageAuth.id)) {
            message.delete();
            const banEmbed = new MessageEmbed()
                .setColor('#ff3505')
                .setTitle('User ban notice')
                .setDescription(`<@${messageAuth.id}>, You have been banned from using this bot by the owner.`,);
            message.channel.send(banEmbed)
                .then(msg => {
                    msg.delete({ timeout: 20000 })
                })
            return;
        }

and

        //check if the guild has been banned from using the bot 
        if (gate.BANNED_GUILDS.includes(message.guild.id)) {
            message.delete();
            const banEmbed = new MessageEmbed()
                .setColor('#ff3505')
                .setTitle('Guild ban notice')
                .setDescription(`<@${messageAuth.id}>, This guild has been banned from using this bot by the owner.`,);
            message.channel.send(banEmbed)
                .then(msg => {
                    msg.delete({ timeout: 20000 })
                })
            return;
        }

Condition 'guildBan.banGuild(guildID)' is always true

Condition guildBan.banGuild(guildID) is always true because it evaluates to a Promise object. The value of expression guildBan.banGuild(guildID) is originated from the return value of banGuild() defined at line 35

    run(message, { guildID }) {
        if(guildBan.banGuild(guildID)) {
            //if the user was banned respond with this

botbanuser

botbanuser does not display the correct message when a user is banned from using the bot

(JS-D009) Prefer ternary operator

Description

Using an if-else statement typically results in more lines of code than a single-line ternary expression, which leads to an unnecessarily larger codebase that is more difficult to maintain. Additionally, using an if-else statement can result in defining variables using let or var solely to be reassigned within the blocks. …

Occurrences

There are 2 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Antares-Network/AntaresBot/issue/JS-D009/occurrences/

README links are dead

Describe the bug
Bot feature links are broken in README

To Reproduce
Go to repo AntaresBot
Click on Bot Features links

Expected behavior
Links should bring you somewhere :)

Screenshots
image

  • Browser: chrome (Brave)

crashes when missing permissions

bot crashes when it does not have permissions to talk in a particular channel and it is forced to do so. this is a MAJOR problem why does it do this

Condition 'guildBan.unBanGuild(guildID)' is always true

Condition guildBan.unBanGuild(guildID) is always true because it evaluates to a Promise object. The value of expression guildBan.unBanGuild(guildID) is originated from the return value of unBanGuild() defined at line 53 of actions/guildBan.js.

    run(message, { guildID }) {
        if (guildBan.unBanGuild(guildID)) {
            //if the guild was unbanned respond with this

invalid command reaction thingy

make the bot react to all messages that start with the bot's prefix but arent actual commands. then if someone clicks on the bot's reaction, it will explain that the command they entered is not a valid command.

(JS-0128) Should not have unused variables

Description

Found variables that are declared but not used anywhere. <!--more--> Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers. Also, having unused variables affects …

Occurrences

There are 8 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Antares-Network/AntaresBot/issue/JS-0128/occurrences/

Buttons and Menus

add buttons for commands and see if menus would be a viable option in the future

Update delivery of moderation messages

Make all ban and unban commands need to go thru dm's and not thru channels. Also send a copy of all messages to the bot owner with all the relevant information

bot ---> this.client

Replace all instances of the bot object with this.client or find a way to setup an object alias so that any references to bot get translated to this.client so that the bot object does not have to be global and can have its scope locally in index.js

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.