[Skype Bot] Automate and Schedule Your Everyday Skype Group Message using Python

 

At first install skpy

pip install SkPy

Then find out the group id of Your Skype

from skpy import Skype
sk = Skype("email","password")
channel = sk.chats.recent()
print(channel)

Then create a file named skype.py and paste this code with your credential

from skpy import Skype
def post_message(msg,channel_id):
"Post a message"
sk = Skype("email","password")
channel = sk.chats.chat(channel_id)
channel.sendMsg(msg)
print("Message Sent")

post_message("Good Morning","[email protected]")

Now, create a cron job in your linux machine

crontab -e

0 8 * * 1-5  python3 /home/your_username/skype.py

This cron expression willl send message to your group on Monday to Friday at 8.00 AM

You can change the cron expression according to your needs. You need to keep your linux machine on for this task.



Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment