常常有許多帳號因為被盜用,前往伺服器濫發訊息,然而有時候管理員或板主都並不在線上,沒辦法即時處理這些東西,這時候 AutoMod 就派上用場了
只要有使用者發送了包含 AutoMod 的訊息,可以設定為警告使用者、禁言使用者,並將訊息阻擋發送,紀錄誰有發送過等
下方會先提供一些常用的封鎖字詞與使用後的結果
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-16-1024x618.png)
因為是自訂封鎖,所以請先點選建立封鎖自訂字詞,跟下面圖片中一樣才對
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-36-1024x107.png)
用法 1:封鎖 @everyone, @here
選擇您的字詞中輸入: @everyone, @here
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-11-1024x401.png)
結果:
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-12.png)
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-15.png)
最主要的還是不要有身分組包含提及權限。
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-37.png)
用法 2:禁止標記某個人
需先開啟 Discord 進階中的開發者模式,方便取得使用者 ID
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-13-1024x150.png)
取得使用者 ID:右鍵使用者 → 複製使用者 ID
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-14.png)
選擇您的字詞中輸入: <@使用者ID>
當有第二的使用者的時候就輸入 半形逗號 <@使用者ID>
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-17-1024x404.png)
結果:
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-18-1024x240.png)
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-19.png)
用法 3:Discord 邀請連結/機器人邀請連結
點選使用您的字詞中輸入下方的「使用正規表達式進行進階配對」輸入:
(discord\.gg|discord\.com\/invite)
(discord\.com\/oauth2\/authorize)
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-21-1024x735.png)
結果:
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-22-1024x250.png)
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-23.png)
用法 4:封鎖 Markdown 網址
[網址A](網址B),此時只有網址 A 會顯示,讓使用者以為是正常網址
點選使用您的字詞中輸入下方的「使用正規表達式進行進階配對」輸入:
\[[^]]+\.[^]]+/[^]]+\]\(https?://.+\)
![](https://haer0248.me/blog/wp-content/uploads/2024/03/image-7-1024x718.png)
結果:
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-32.png)
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-33-1024x263.png)
AutoMod 設定
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-24-1024x409.png)
每個 AutoMod 都可以個別設定,是否要封鎖訊息並顯示錯誤訊息(上方圖片的「伺服器板主訊息:」後方的文字)
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-28.png)
傳送警告:上方每張結果圖的第二張,會顯示觸發了哪一種關鍵字與規則判斷
將成員禁言:觸發到 AutoMod 規則的使用者會被禁言多久
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-25.png)
也有些頻道/身分組/使用者可能是豁免的,在下方你可以設定
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-26-1024x184.png)
像我的伺服器中,只有 #第三方社群與廣告宣傳 頻道與部分身分組是允許發送邀請連結的,因此我設定:
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-27-1024x293.png)
設定完畢後,記得開啟 AutoMod 過濾規則,這樣就可以安安心心去睡覺啦!
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-29.png)
![](https://haer0248.me/blog/wp-content/uploads/2024/02/image-30.png)
記得:發送警告的頻道不要讓所有使用者都可見,不然封鎖了也沒意義。