Code Monkey home page Code Monkey logo

mirai's People

Contributors

brussell98 avatar hsiw avatar nandub 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mirai's Issues

Making a command

I've tried following the guidance that you've given on adding a command to Mirai, however every time I've tried to add a command, it does not work. This is mainly because I don't fully understand the guidance that you have provided.

Bear in mind I have 0 knowledge with Javascript.

Trouble with actually running the bot.

I ran into some problems when trying to run this on both Windows and Linux.

Now i mostly just do codding, scripts, and stuff on Linux, but i have spent a good 45 mins trying to fix this issue. i would run the bot on linux and get this :

/location/of/files/bot/commands.js:107
for (invite of invites) {
^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/location/of/files/BrussellBot.js:6:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

I just can't figure out whats wrong here. i tried to use Visual Studio code source to see if i need that but it didn't help. also installed "module.js" but that did nothing.

Now on the windows side all i got was this.
Logging in...
Disconnected from Discord.

Every time. i turn on the debug and then i get this
Logging in...
DEBUG direct API login, cached token was unavailable
Disconnected from Discord.

Am i doing something wrong? i would really like to have this on my Linux machine but if not, am i doing something wrong on windows?

Any help would be great. Thanks

SyntaxError: Unexpected token )

2016-05-28T13:52:48.014361+00:00 app[bot.1]: /app/BrussellBot.js:314
2016-05-28T13:52:48.014421+00:00 app[bot.1]: );
2016-05-28T13:52:48.014423+00:00 app[bot.1]: ^
2016-05-28T13:52:48.014432+00:00 app[bot.1]: SyntaxError: Unexpected token )
2016-05-28T13:52:48.014432+00:00 app[bot.1]:     at Object.exports.runInThisContext (vm.js:53:16)
2016-05-28T13:52:48.014433+00:00 app[bot.1]:     at Module._compile (module.js:513:28)
2016-05-28T13:52:48.014438+00:00 app[bot.1]:     at Object.Module._extensions..js (module.js:550:10)
2016-05-28T13:52:48.014439+00:00 app[bot.1]:     at Module.load (module.js:458:32)
2016-05-28T13:52:48.014439+00:00 app[bot.1]:     at tryModuleLoad (module.js:417:12)
2016-05-28T13:52:48.014440+00:00 app[bot.1]:     at Function.Module._load (module.js:409:3)
2016-05-28T13:52:48.014440+00:00 app[bot.1]:     at Function.Module.runMain (module.js:575:10)
2016-05-28T13:52:48.014441+00:00 app[bot.1]:     at startup (node.js:160:18)
2016-05-28T13:52:48.014441+00:00 app[bot.1]:     at node.js:449:3

bot.on("serverCreated", server => {
    if (db.serverIsNew(server)) {
        console.log(cGreen("Joined server: ") + server.name);
        if (config.banned_server_ids && config.banned_server_ids.includes(server.id)) {
            console.log(cRed("Joined server but it was on the ban list") + `: ${server.name}`);
            bot.sendMessage(server.defaultChannel, ":name_badge: This server is banned because of rule breaking :name_badge:");
            setTimeout(()=>{bot.leaveServer(server);},1000);
        } else {
            db.addServerToTimes(server);
            bot.sendMessage(server.defaultChannel, `๐Ÿ‘‹๐Ÿป Hi! I'm **${bot.user.username.replace(/@/g, '@\u200b')}**\nYou can use **\`${config.command_prefix}help\`** to see what I can do.\nMod/Admin commands *including bot settings* can be viewed with **\`${config.mod_command_prefix}help\`**\nFor help, feedback, bugs, info, changelogs, etc. go to **<https://discord.gg/0kvLlwb7slG3XCCQ>**`);
            db.addServer(server);
    }

        if (!server.defaultChannel.permissionsOf(bot.user).hasPermission('manageMessages')) {
                bot.sendMessage(server.defaultChannel, ":warning: :no_entry: The bot doesn't have the asked permissions, some errors can be ocurred :no_entry: :warning:");
        }
}
);

PS Line 314 is the last one wich contains "(;"

Twitch following channels live notifications not working anymore

Hi,

First of all thanks for your work and making the Bot :)

Noticed that the Bot stopped posting notifications that a channel is live after 11th of May.

In the Bot Dashboard in the "Twitch Notifications" section it's showing the channel as offline, even if it's online currently.
Tried to refollow the channel but when issuing the m.twitch unfollow command the bot answers with "Error: status code 401".

Twitch API issues?

Where are many of the commands?

I like to host my own bots, I dont know why but I love to.
But while im using the "Bot-chan" Bot, i see that there is a new version available. As any person would do i would try to update it. I did it successfully but I noticed that it has VERY BASIC commands and nothing more. Is there supposed to be more files in the commands folder?
Well Im staying with version 2.3.1 until Mirai has the same or more functionality.

Unhandle exception when executing }settings

On a Mirai vanila execution I get this error on the console when executing }settings command.

}settings 
Unhandled rejection Error: 403 FORBIDDEN
    at IncomingMessage.resp.once.err (/Users/nandub/development/source/Mirai/node_modules/eris/lib/rest/RequestHandler.js:149:35)
    at IncomingMessage.g (events.js:286:16)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

I can see the }settings usage message from discord but I see the above on 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.