You have probably used Python's formatting syntax before. But how do you format a date? With datetime objects, you can use %Y
, %m
, %d
to display respectively, the year, the month and the day of an object, in numerical form (that is, March will be replaced by the number "03").
In times when we lack inspiration, it might help to have a program randomly picking an aphorism for us. An aphorism is a concise expression of a general truth or principle. But you can also use a joke or anything else.
In this article we'll see how to code your simple bot for Slack, and schedule it to run regularily. As some testing might be necessary, I recommend to create a dummy Slack workspace for this tutorial.