Slack Reddit



Contribute to vmilojevic/slack-reddit-notifier development by creating an account on GitHub.

For such a tiny bubble, it sure causes a major headache.

  • Contribute to vmilojevic/slack-reddit-notifier development by creating an account on GitHub.
  • If your employer is using Slack’s free or standard plan — you can check this by going through the drop-down menu under your name on the app — they need Slack’s go-ahead, meaning the.

As more and more people find themselves stuck working from home for the foreseeable future, an ever-growing number of Slack users are now faced with the same problem: How to appear as 'active' when they're actually... not.

For the unaware, Slack is a messaging tool that many workplaces (and friend groups) use to communicate remotely. Within the service, next to your online handle, rests a little telltale bubble. Depending on whether or not you're currently using the service, Slack will either display a green bubble for active or an empty bubble for away.

As you might imagine, this is a helpful tool for bosses trying to keep tabs on their employees; it's also the enemy of workers who are just trying to live their lives and stop thinking about the coronavirus for even a goddamn second.

Which brings us to the issue at hand: Keeping those bubbles green. Slack says it 'automatically determines your availability based on how consistently you're interacting with the app on your device.'

More specifically, Slack has a host of conditions it uses to determine whether or not that bubble shows you as working. If you're using the mobile Slack app, the bubble is green only when the app is open — it switches off the moment you toggle away. If you use the Slack desktop app or access Slack via a browser, then after 30 minutes of inactivity the jig is up.

Importantly, if you're using the Slack desktop app that's 30 minutes of 'system inactivity.' Whereas, if you're using a browser to access Slack, it's 30 minutes of 'browser inactivity.' Remember that distinction, because it matters.

'Note,' cautions Slack in bold type, 'There is no way to set yourself as permanently active.'

Which, OK, maybe. But that doesn't mean there aren't ways to trick the system into thinking you are active. Take, for example, this ingenious individual who, it appears, hooked their wireless mouse up to a toy train.

弊社はリモート勤務の際にPCのスリープとか操作中とかが管理者にバレる環境なので、常にマウス操作をしてるように見える装置を作りました。 pic.twitter.com/cYqoAHb6SB

— 赤祖父 (赤ソファ) (@akasofa) March 12, 2020

'We created a device that seems to always operate the mouse, because the environment in which the sleep or operation of the PC is remote to the administrator when working remotely,' reads the tweet translated (albeit poorly) by Twitter.

If a work-from-home employee had their desktop Slack app open — say, for example, to the Direct Message channel with Slackbot — then the above contraption should keep their Slack bubble green for up to 30 minutes after the train stops moving. That's because there is general system activity of the mouse moving around (even if not specific browser activity).

But not all of us have toy trains sitting around ready to be repurposed. And that's OK because if you have a smartphone and an optical mouse, then you already have all you need to fool Slack and your (micro) manager.

Slack Versus Microsoft Teams

'I think that if you put an optical mouse on the smartphone video, it will move irregularly,' reads the below tweet (again translated by Twitter). '(Lol) (Unverified)'

思い付きですが
光学式マウスならスマフォ動画の上に乗せておけば不規則な動きをすると思います!(笑)
(未実証) pic.twitter.com/dIS7kLke9j

— 池袋スイーツ侍 (@ike_sweets_smr) March 14, 2020

Is Slack Part Of Microsoft

And guess what reader... in my (admittedly limited) at-home test, the above hack actually worked. As long as your phone doesn't go to sleep (this is important, so keep it plugged in) and the video keeps playing, your optical mouse should move ever so slightly, tricking the desktop app version — not the browser version —of Slack into thinking you're still busy and not asleep in the next room.

For the test, I loaded up a random nature documentary on YouTube, turned my smartphone's brightness up to maximum, plugged the phone in, and placed my optical mouse directly on top of the screen. Then I set a 30-minute timer and walked away. Thirty-two minutes later, my editor confirmed my Slack status bubble was still green. (In a later test with a different video, the trick did not work. In other words, test this out first before you commit to your nap.)

SEE ALSO: 7 Slack privacy settings you should enable now

What makes this Slack hack even better is that it doesn't require installing a mouse-jiggling app, which could be a security risk.

Now, it's worth noting, that there's probably a much simpler way to do all of this. On an iPhone with the Slack app, you can set the phone's 'Auto-Lock' to never and then (with your phone plugged in) open the Slack app. This will likely work as well — remember, as long as 'Slack is open' on your mobile device, Slack says you'll be shown as active — although I didn't test it.

Importantly, your bosses may still suspect you're napping on the job when you don't respond to their repeated and frantic @yourname messages. But that's a small price to pay for the 45-minute nap you'll be too busy taking to care.

Reddit Slack Vs Discord

UPDATE: July 1, 2020, 2:24 p.m. PDT: After months of (ahem) rigorous testing, I can confirm that setting your smartphone auto-lock to 'never' is a much simpler — and consistently successful — approach. Also, you can use this method on the go and still have your phone with you.

Here's what you do: In the Slack app, in a direct message to yourself, drop in a random GIF. Then, when you want to keep your Slack status active (after setting auto-lock, under 'Display & Brightness' on an iPhone, to 'never'), go into that DM with yourself and click on the GIF.

You now technically have the app open, and, because you're in a DM with yourself, the chances of your thigh accidentally DMing your boss have plummeted. Turn down the brightness on your screen to conserve battery life, slide that phone in your pocket, and be on your way.

This is my first time using Praw so when I was reading up on how to use it I came across Build a reddit bot that was pretty much what I wanted. So I used most of their code for the Reddit side of things.

You can find the source for this on Github: Reddit Slack Bot

I recently became the moderator of the Learn Ruby on Rails subreddit. I want to build out the subreddit and add relevant information on setting up a dev environment, Ruby and Rails tutorials, and foster a community of learning.

To that end I created a free slack team for the subreddit so teachers and learners could come together. Invite yourself to our Slack team!

(I wrote this script in Python and yes, I get the irony of using Python for a Ruby based subreddit.) :)

I thought it would be a good idea to have posts made to the subreddit show up in the Slack channel. I’ve seen the equivalent for subreddits that have IRC channels and I didn’t think it would be very hard to accomplish. And it really wasn’t. Less than 50 lines of code!

There’s two libraries we’re going to need to install via pip.

Reddit

We’re also going to need the os library but that’s a core part of Python, so nothing to install there.

After we’ve installed those via pip we can start our script.

Slack Reddit Bot

Import them into our script

Reddit

Connect to slack

For this we’ll need a token. You can create an API token for your team in your Slack settings.

Create user agent for Reddit api

Reddit requires you to give the name of a user agent to connect with. It can pretty much be anything (I think) so I gave mine a fairly descriptive name.

Create connection to reddit

Storing id’s of submissions in a text file for now.

That should probably eventually be stored in a database, probably sqlite.

First check to see if the file exists, if it doesn’t create an empty array to store the submission ids

If the file does exist then read it in, split on the new line characters and filter out None as it’s possible to have a blank file.

Praw call to connect to our subreddit of choice!

Loop through the new submissions. We’re only grabbing 5 each time

Open our text file and write out the new submission.id so we don’t post it again.

Miscellaneous

Reddit also asks that you only hit their api once every 30 seconds. To monitor the new submissions I set a cron job to run this every minute. I tested this by letting the newest 5 submissions get posted to slack, then I created a test post to make sure it was posted. When it showed up in our Slack channel I knew we were set!