I built something that changed my friend group's social fabric
我打造了一個改變朋友圈社交結構的東西
This is a story that started back in 2022, but I think its a perfect time to reflect on the impact that it has had on my friend group still to this day.
這個故事要從 2022 年說起,但我認為現在正是反思它至今仍對我們朋友圈產生影響的最佳時機。
更新(2025 年 2 月 7 日):這篇文章的反響真的讓我大吃一驚。它登上了 Hacker News 首頁並獲得第一名,那邊有些很棒的討論。
A year or so before COVID, our friend group dispersed across the world - I moved to Vancouver, one friend moved to the UK and another one moved to the United States. The rest of them still lived in Melbourne.
在新冠疫情爆發前一年左右,我們的朋友圈分散到了世界各地——我搬到了溫哥華,一位朋友去了英國,另一位去了美國。其他人則仍住在墨爾本。
Once COVID hit, like many others, we looked to find a way to keep in contact and still hang out. We have always been a big gaming group (both board game & video games) so moving online seemed like a logical choice. We had always used Discord so we started to ramp up our time there.
當疫情爆發時,和許多人一樣,我們試圖找到一種保持聯繫並繼續聚會的方式。我們一直是一個熱愛遊戲的團體(無論是桌遊還是電玩),所以轉移到線上似乎是個合理的選擇。我們一直使用 Discord,因此開始增加在那裡的活動時間。
The problem 問題所在
Over the next year, our group chat (in Signal) was drowning in notifications. A mix of general chit chat, talks on the ever changing news of COVID and the most important - when can people play games and chat. It really annoyed me when people would post on "hey anyone wanna play [game] in 15 mins?", for it to be buried in another 5 messages. The message would have to be constantly bumped in Signal before we eventually jumped in a voice chat in our Discord server. My friends were also annoyed that they didn't know we were playing a certain game tonight, for us to go "we talked about it on Signal!". Something had to change.
在接下來的一年裡,我們的群組聊天(在 Signal 上)被通知淹沒了。內容混雜著日常閒聊、不斷變化的疫情新聞討論,以及最重要的——大家何時能一起玩遊戲和聊天。最讓我困擾的是,當有人發文「嘿,有人 15 分鐘後想玩[遊戲]嗎?」時,這條訊息很快就被其他 5 條訊息淹沒。在 Signal 上,這條訊息必須不斷被頂上來,直到我們最終跳進 Discord 伺服器的語音聊天。我的朋友們也很困擾,因為他們不知道我們今晚要玩某款遊戲,而我們只能說「我們在 Signal 上討論過了!」。必須做出改變。
The solution 解決方案
I thought, rather than people typing in Signal that they want to play a game in Discord, it would be better for Discord to notify us when someone has joined a voice channel in our server. Now you're probably thinking "Daniel, wouldn't this just be another notification that people would miss?" - you would be right to be skeptical, but I thought that since it was a distinct notification from Discord rather than Signal it would be better.
我心想,與其讓大家在 Signal 上打字說想上 Discord 玩遊戲,不如讓 Discord 在有人加入我們伺服器的語音頻道時主動通知大家。現在你可能會想「Daniel,這不就只是另一個會被忽略的通知嗎?」——你的懷疑很合理,但我認為既然是 Discord 發出的專屬通知而非來自 Signal,效果應該會更好。
I went to Discord to find a setting to send a notification to the server when someone joined a voice channel, and I came up with crickets. There was no such thing. Eventually I found that you can write a Discord bot to leverage the on_voice_state_update
from discord.py, a Discord API wrapper. So I spun up a new git repo and got to work writing a simple Discord bot. Here is main guts of the bot.
我跑去 Discord 想找個設定,能在有人加入語音頻道時發送通知給伺服器,結果一無所獲。根本沒有這種功能。最後我發現可以透過 discord.py 這個 Discord API 封裝套件來編寫機器人,利用 on_voice_state_update
功能。於是我就開了一個新的 git 倉庫,開始動手寫一個簡單的 Discord 機器人。以下是這個機器人的核心程式碼。

Since on_voice_state_update
triggers on when a member joins or leaves a voice channel and if the member muted or deafened - we must check that the before
channel is null and the after
channel is not null to signify that they have joined a voice channel.
由於 on_voice_state_update
會在成員加入或離開語音頻道時觸發,也會在成員靜音或關閉喇叭時觸發——我們必須檢查 before
頻道是否為空值,且 after
頻道非空值,才能確認他們是真的加入了語音頻道。
We then get the first text channel of the server so that our bot can send the message to the server. Then we actually send the message to the text channel. I added the delete_after
option so that the text channel is not clogged up with all the messages sent from the bot. All we care about is receiving the notification. Finally, I add a record into a postgres table (hosted on Supabase) of the Discord server (guild), the member id and member display name along with a timestamp of when they joined. All this juicy data will come in handy later.
接著我們取得伺服器的第一個文字頻道,這樣我們的機器人才能將訊息傳送到伺服器。然後我們實際將訊息發送到文字頻道。我加入了 delete_after
選項,這樣文字頻道才不會被機器人發送的所有訊息塞滿。我們真正在意的只是收到通知。最後,我在 Supabase 託管的 postgres 表格中新增一筆記錄,包含 Discord 伺服器(公會)、成員 ID 和成員顯示名稱,以及他們加入的時間戳記。這些寶貴的資料之後都會派上用場。
I originally hosted the bot on fly.io. But I've been on a mission to learn more about self-hosting, so I bought a server from Hetzner and it runs on same server as this blog using Coolify.
我原本將機器人託管在 fly.io 上。但為了學習更多自架主機的知識,我從 Hetzner 買了一台伺服器,現在它和這個部落格運行在同一台伺服器上,使用 Coolify 管理。
I added the bot to the server with the appropriate permissions and we are live! Here's what it looks like.
我以適當的權限將機器人加入伺服器,現在正式上線了!來看看實際運作的樣子。
Discord 電腦版客戶端的通知

The reaction 大家的反應
My friends had mixed views when I initially told them. It was a 50/50 split between 'that sounds useful', to 'that sounds dumb and I won't use it'. The hardest part was convincing people to download the Discord app on their phone as most of us didn't have it downloaded.
當我最初告訴朋友們時,他們的反應相當兩極。一半的人覺得「這聽起來很實用」,另一半則認為「這聽起來很蠢,我才不會用」。最困難的部分是說服大家下載 Discord 應用程式到手機上,因為我們多數人原本都沒安裝。
Only a few months later, I had moved back to Melbourne and was with my friends on a sunny afternoon at a pub. My friend, Jack, who was initially in the 'I wont use it' camp, completely changed his tune. He said that it encourages him to jump into Discord not even to play games but just to have a quick chat with everyone and to socialize.
幾個月後,我搬回墨爾本,在某個陽光午後和朋友們在酒吧相聚。原本屬於「我才不用」陣營的朋友傑克,態度完全轉變了。他說這讓他更願意打開 Discord,甚至不是為了打遊戲,只是想和大家快速聊聊天、社交一下。

我們群組的蝙蝠信號
I quickly realized that this has not just reduced the amount of messages around organizing to play games, it acted as a Batsignal for our friends to hang out. I estimated that over 60% of the time when people join Discord, it's just to have a chin-wag about our day and not to play a game.
我很快意識到,這不僅減少了安排遊戲的訊息量,更成為朋友們相聚的「蝙蝠信號」。我估計超過 60%的時間,大家加入 Discord 只是為了閒聊日常,而非玩遊戲。
The results 成果
Since I had been keeping a record of each time someone joined Discord, I now had years worth of data to see some trends (as of 27th June 2025).
由於我一直記錄著每次有人加入 Discord 的時間,現在我擁有了多年數據來觀察趨勢(截至 2025 年 6 月 27 日)。
Year 年度 | Times joined 加入次數 | Days joined 加入天數 |
---|---|---|
2022 | 2374 | 318 |
2023 | 3181 | 345 |
2024 | 3503 | 352 |
2025 | 1378 | 171 |
Even I am staggered on how much we use Discord. Our sessions varies a lot from 5-30 mins to nights of multi-hour gaming sessions. All of my friends are in their 30s and with a few of us being first-time Dads. Being one of those Dad's - it was a life savior when my little one was a newborn to jump onto Discord for even 5 minutes to chat with my friends, watch someone play a game and then log off for another diaper change. Our group has gone from primarily text-based chat to chatting on Discord most nights - it's reminiscent of picking up the landline back in the 90s and calling your friends.
就連我自己也對我們使用 Discord 的頻率感到驚訝。我們的聊天時長從 5 到 30 分鐘不等,有時甚至會整晚進行好幾個小時的遊戲連線。我的朋友們都三十多歲了,其中有幾位還是新手爸爸。身為其中一位父親——當我家寶寶剛出生時,能抽空登入 Discord 和朋友聊個 5 分鐘、看別人玩遊戲,然後下線換尿布,簡直是救命稻草。我們這群人的交流方式已從主要靠文字訊息,變成幾乎每晚都在 Discord 上聊天——這讓我想起 90 年代拿起家用電話打給朋友的日子。

這就是當我和朋友們一起加入 Discord 時的感受
Every year we have an annual Christmas party for our friends and since last year I've been doing a 'Discord Wrapped' (cross with the Dundies from the Office) - where I announce who has joined Discord the most as well as providing each person with stats around their year on Discord. It's been such a fun way to recap the year and see trends of our activity.
每年我們都會為朋友們舉辦一場聖誕派對,自從去年開始,我開始製作「Discord 年度回顧」(靈感來自《辦公室瘋雲》中的 Dundies 獎)——我會宣布誰最常使用 Discord,並提供每個人這一年在 Discord 上的數據統計。這真是個有趣的方式來回顧這一年,並觀察我們活動的趨勢。


Conclusion & what's next
結論與下一步計畫
I didn't realize the impact this would have on our group, but I'm very grateful I had a few hours to spare one Sunday to quickly whip this Discord bot up.
我原本沒意識到這會對我們群體產生如此大的影響,但很慶幸某個週日能抽出幾小時快速打造出這個 Discord 機器人。
I plan to add achievements based on who you hung out on Discord and some other fun ideas, as well as tracking when you left Discord to get those juicy hours spent stats.
我計畫根據大家在 Discord 上的互動新增一些成就系統,還有其他有趣的點子,同時也會追蹤離開 Discord 的時間來計算那些寶貴的線上時數統計。
I also had this idea to turn this into an IoT device that has 5 RGB lights and sits on your desk. It would light up when each friend you have delegated joins your Discord voice channel and you could customize the colour for each friend. If I get some traction I might turn it into a real product, so email me at my email address in my about page if that seems something you'd like.
我還想到可以把這功能做成一個 IoT 裝置,配備 5 顆 RGB 燈放在桌上。當你指定的每位朋友加入 Discord 語音頻道時,對應的燈就會亮起,而且能為每個朋友設定專屬顏色。如果反應熱烈,我可能會把它做成實際產品,有興趣的話歡迎到我個人頁面中的電子郵件地址聯繫我。
更新(2025 年 3 月 7 日):在閱讀了 HN 上的評論後反思。這個解決方案之所以有效,另一個原因是行動勝於言語。人們很容易說「我馬上上線」,但隨後就被其他事情分心,30 分鐘後才真正連線。這就像有人說「現在要走了」,卻才開始準備出門一樣。由於我們會收到某人已採取上線行動的通知,這表示他們百分之百可以聊天或玩遊戲。