'Using tweepy API to send timed direct messages

I've been messing around with tweepy as a way to get into learning basic python script writing. I figured out how to tweet via an edited text document to .py script and to send direct messages. Is there a way to send a timed or scheduled direct message in seconds or minutes? Code I use below

import tweepy

auth = tweepy.OAuthHandler("key", "key")

auth.set_access_token("key", "key")

api = tweepy.API(auth)

recipient_id = "twitter id"

api.send_direct_message(recipient_id, "Hey")

Is there anything I can add to set a timer on the direct message?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source