skybot icon indicating copy to clipboard operation
skybot copied to clipboard

best way to make the bot PM everyone in a channel?

Open chrismcfee opened this issue 9 years ago • 2 comments

I'm curious if anyone has a good method of PMing everyone in a specific channel that the bot has joined. Preferably not all at once.

If not, just PMing users in general.

chrismcfee avatar Jul 14 '15 23:07 chrismcfee

I've had a bit of success getting the bot to PM people in one of my plugins.

This should get you started as an example. Note the pm=None in the function.

from util import hook

def pmUser(input, pm=None):
    pm("Hello. I am a bot and I am PMing you", USER_TO_PM)

(I'm far from an expert in this. Just answering because I think I know the answer and it's been a few months since it was asked, so why not?)

hailspuds avatar Aug 11 '16 23:08 hailspuds

Simply set the channel in your send to the user's nick.

On 12 Aug 2016 9:36 AM, "Will" [email protected] wrote:

I've had a bit of success getting the bot to PM people in one of my plugins.

This should get you started as an example. Note the pm=None in the function.

from util import hook

def pmUser(input, pm=None): pm("Hello. I am a bot and I am PMing you", USER_TO_PM)

(I'm far from an expert in this. Just answering because I think I know the answer and it's been a few months since it was asked, so why not?)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rmmh/skybot/issues/133#issuecomment-239325122, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZoEavikwX1dE-AXWAmp8AfH56AV32Sks5qe7IGgaJpZM4FYpm0 .

Red-M avatar Aug 12 '16 00:08 Red-M