Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Welcome message? #51

Open
skyleter opened this issue Feb 12, 2016 · 4 comments
Open

Welcome message? #51

skyleter opened this issue Feb 12, 2016 · 4 comments

Comments

@skyleter
Copy link

How i can setup a welcome msg?
like

user join:
bot: Welcome [user]
left
bot: Goodbye [user]

@chalda
Copy link
Owner

chalda commented Feb 12, 2016

@Einarin had something like this setup. Got extremely annoying very fast.
Welcome message could be cool tho. Good bye message seems a bit too much. I
guess we should have it as a feature and have it as a preference
On Feb 12, 2016 1:26 AM, "Skyleter" [email protected] wrote:

How i can setup a welcome msg?
like

user join:
bot: Welcome [user]
left
bot: Goodbye [user]


Reply to this email directly or view it on GitHub
#51.

@Ulydev
Copy link
Contributor

Ulydev commented Mar 5, 2016

+1, I tried it on my server but it's really annoying. When you have 200+ people on your server the bot starts spamming like hell.

@Einarin
Copy link
Collaborator

Einarin commented Mar 6, 2016

@mogokcp It is super annoying so I don't recommend it, but if you want to try it is easy to add. You'd modify the presence function in discord_bot.js line 733. Something like this:

bot.on("presence", function(user,status,gameId) {
    if(status === "online"){
        bot.sendMessage(bot.channels.get("name","your_channel_name"),"Welcome "+user.name);
    }
    try{
    if(status != 'offline'){
        if(messagebox.hasOwnProperty(user.id)){
            console.log("found message for " + user.id);
            var message = messagebox[user.id];
            var channel = bot.channels.get("id",message.channel);
            delete messagebox[user.id];
            updateMessagebox();
            bot.sendMessage(channel,message.content);
        }
    }
    }catch(e){}
});

@Einarin
Copy link
Collaborator

Einarin commented Sep 20, 2016

Maybe we should add this as an off by default feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants