Skip to content

Commit

Permalink
拦截广告用户
Browse files Browse the repository at this point in the history
  • Loading branch information
IJNKAWAKAZE committed Nov 4, 2024
1 parent 9126a41 commit 87b15e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
5 changes: 4 additions & 1 deletion arknights.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ headhunt:

recruit:
missing:
jp: 酸糖/芳汀/燧石/四月/森蚺/史尔特尔
jp: 杰克/絮雨/泥岩/山/卡夫卡/松果
tags: 高级资深干员-高资/高级资深千员-高资/高级资深于员-高资/资深干员-资深/资深千员-资深/新手-新手/近卫干员-近卫干员/近卫千员-近卫干员/狙击干员-狙击干员/狙击千员-狙击干员/重装干员-重装干员/重装千员-重装干员/医疗干员-医疗干员/医疗千员-医疗干员/辅助干员-辅助干员/辅助千员-辅助干员/术师干员-术师干员/术师千员-术师干员/特种干员-特种干员/特种千员-特种干员/先锋干员-先锋干员/先锋千员-先锋干员/近战位-近战位/远程位-远程位/支援机械-机械/控场-控场/爆发-爆发/治疗-治疗/支援-支援/费用回复-费用回复/發用回复-费用回复/输出-输出/生存-生存/群攻-群攻/防护-防护/减速-减速/削弱-削弱/快速复活-快速复活/位移-位移/召唤-召唤/元素-元素/上級エリート-高资/上級工リート-高资/エリート-资深/工リート-资深/初期-新手/前衛タイプ-近卫干员/狙撃タイプ-狙击干员/重装タイプ-重装干员/医療タイプ-医疗干员/補助タイプ-辅助干员/術師タイプ-术师干员/特殊タイプ-特种干员/先鋒タイプ-先锋干员/近距離-近战位/遠距離-远程位/ロポット-机械/牽制-控场/爆発力-爆发/治療-治疗/COST回復-费用回复/火力-输出/範囲攻撃-群攻/防御-防护/減速-减速/弱化-削弱/高速再配置-快速复活/強制移動-位移/召喚-召唤

# 过滤bio关键词
ad: []

# 森空岛请求代理 不填就不使用代理
proxy: http://localhost:1234
13 changes: 0 additions & 13 deletions src/core/bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,13 @@ import (
"arknights_bot/plugins/sign"
"arknights_bot/plugins/skin"
"arknights_bot/plugins/system"
tgbotapi "github.com/ijnkawakaze/telegram-bot-api"
"log"
)

// Serve TG机器人阻塞监听
func Serve() {
log.Println("机器人启动成功")
b := bot.Arknights.AddHandle()
b.NewProcessor(
func(update tgbotapi.Update) bool {
if update.Message != nil && update.Message.ViaBot != nil {
return update.Message.ViaBot.ID == 273234066 //PostBot Id
}
return false
},
func(update tgbotapi.Update) error {
update.Message.Delete()
return nil
},
)
b.NewMemberProcessor(gatekeeper.NewMemberHandle)
b.LeftMemberProcessor(gatekeeper.LeftMemberHandle)

Expand Down
3 changes: 3 additions & 0 deletions src/plugins/enemy/enemy_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ func EnemyHandle(update tgbotapi.Update) error {
if name == "多萝西" {
name = "多萝西(敌方)"
}
if name == "弑君者" {
name = "弑君者(敌方)"
}
enemy := ParseEnemy(name)
if enemy.Name == "" {
sendMessage := tgbotapi.NewMessage(update.Message.Chat.ID, "未查询到此敌人,请输入正确的敌人名称。")
Expand Down

0 comments on commit 87b15e7

Please sign in to comment.