Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @silent to news messages #136

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions eod/polls/catsuccess.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (p *Polls) categorizeSuccess(po *types.Poll, news func(string)) error {
} else {
name = fmt.Sprintf("%d elements", len(elems))
}
news(fmt.Sprintf("🗃️ Added **%s** to **%s** %s", name, po.Data["cat"].(string), p.pollContextMsg(po)))
news(fmt.Sprintf("@silent 🗃️ Added **%s** to **%s** %s", name, po.Data["cat"].(string), p.pollContextMsg(po)))

return nil
}
Expand Down Expand Up @@ -92,7 +92,7 @@ func (p *Polls) unCategorizeSuccess(po *types.Poll, news func(string)) error {
name = fmt.Sprintf("%d elements", len(elems))
}

news(fmt.Sprintf("🗃️ Removed **%s** from **%s** %s", name, po.Data["cat"].(string), p.pollContextMsg(po)))
news(fmt.Sprintf("@silent 🗃️ Removed **%s** from **%s** %s", name, po.Data["cat"].(string), p.pollContextMsg(po)))
return nil
}

Expand All @@ -108,7 +108,7 @@ func (p *Polls) catImageSuccess(po *types.Poll, newsFunc func(string)) error {
if po.Data["old"] == "" {
word = "Added"
}
newsFunc(fmt.Sprintf("📸 %s Category Image - **%s** %s", word, po.Data["cat"].(string), p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 📸 %s Category Image - **%s** %s", word, po.Data["cat"].(string), p.pollContextMsg(po)))

return nil
}
Expand All @@ -121,7 +121,7 @@ func (p *Polls) catMarkSuccess(po *types.Poll, newsFunc func(string)) error {
}

// News
newsFunc(fmt.Sprintf("📝 Signed Category - **%s** %s", po.Data["cat"].(string), p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 📝 Signed Category - **%s** %s", po.Data["cat"].(string), p.pollContextMsg(po)))

return nil
}
Expand All @@ -134,7 +134,7 @@ func (p *Polls) catColorSuccess(po *types.Poll, newsFunc func(string)) error {
}

// News
newsFunc(fmt.Sprintf("🎨 Colored Category - **%s** %s", po.Data["cat"].(string), p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 🎨 Colored Category - **%s** %s", po.Data["cat"].(string), p.pollContextMsg(po)))

return nil
}
4 changes: 2 additions & 2 deletions eod/polls/elemcreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ func (e *Polls) elemCreate(p *types.Poll, news func(string)) (err error) {

// Message
if exists {
news(fmt.Sprintf("🆕 Combination - **%s** %s - Combination **#%d**", name, e.pollContextMsg(p), combid))
news(fmt.Sprintf("@silent 🆕 Combination - **%s** %s - Combination **#%d**", name, e.pollContextMsg(p), combid))
} else {
news(fmt.Sprintf("🆕 Element - **%s** %s - Element **#%d**", name, e.pollContextMsg(p), id))
news(fmt.Sprintf("@silent 🆕 Element - **%s** %s - Element **#%d**", name, e.pollContextMsg(p), id))
}
return
}
6 changes: 3 additions & 3 deletions eod/polls/elemsuccess.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (p *Polls) elemImageSuccess(po *types.Poll, newsFunc func(string)) error {
if po.Data["old"] == "" {
word = "Added"
}
newsFunc(fmt.Sprintf("📸 %s Image - **%s** %s", word, name, p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 📸 %s Image - **%s** %s", word, name, p.pollContextMsg(po)))

return nil
}
Expand All @@ -43,7 +43,7 @@ func (p *Polls) elemMarkSuccess(po *types.Poll, newsFunc func(string)) error {
}

// News
newsFunc(fmt.Sprintf("📝 Signed - **%s** %s", name, p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 📝 Signed - **%s** %s", name, p.pollContextMsg(po)))

return nil
}
Expand All @@ -62,7 +62,7 @@ func (p *Polls) elemColorSuccess(po *types.Poll, newsFunc func(string)) error {
}

// News
newsFunc(fmt.Sprintf("🎨 Colored - **%s** %s", name, p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 🎨 Colored - **%s** %s", name, p.pollContextMsg(po)))

return nil
}
10 changes: 5 additions & 5 deletions eod/polls/querysuccess.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (p *Polls) queryCreateSuccess(po *types.Poll, news func(string)) error {
}

// News
news(fmt.Sprintf("🧮 Created Query - **%s** %s", po.Data["query"], p.pollContextMsg(po)))
news(fmt.Sprintf("@silent 🧮 Created Query - **%s** %s", po.Data["query"], p.pollContextMsg(po)))
return nil
}

Expand All @@ -34,7 +34,7 @@ func (p *Polls) queryDeleteSuccess(po *types.Poll, news func(string)) error {
}

// News
news(fmt.Sprintf("🗑️ Deleted Query - **%s** %s", po.Data["query"], p.pollContextMsg(po)))
news(fmt.Sprintf("@silent 🗑️ Deleted Query - **%s** %s", po.Data["query"], p.pollContextMsg(po)))
return nil
}

Expand All @@ -50,7 +50,7 @@ func (p *Polls) queryImageSuccess(po *types.Poll, newsFunc func(string)) error {
if po.Data["old"] == "" {
word = "Added"
}
newsFunc(fmt.Sprintf("📸 %s Query Image - **%s** %s", word, po.Data["query"].(string), p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 📸 %s Query Image - **%s** %s", word, po.Data["query"].(string), p.pollContextMsg(po)))

return nil
}
Expand All @@ -63,7 +63,7 @@ func (p *Polls) queryMarkSuccess(po *types.Poll, newsFunc func(string)) error {
}

// News
newsFunc(fmt.Sprintf("📝 Signed Query - **%s** %s", po.Data["query"].(string), p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 📝 Signed Query - **%s** %s", po.Data["query"].(string), p.pollContextMsg(po)))

return nil
}
Expand All @@ -76,7 +76,7 @@ func (p *Polls) queryColorSuccess(po *types.Poll, newsFunc func(string)) error {
}

// News
newsFunc(fmt.Sprintf("🎨 Colored Category - **%s** %s", po.Data["query"].(string), p.pollContextMsg(po)))
newsFunc(fmt.Sprintf("@silent 🎨 Colored Category - **%s** %s", po.Data["query"].(string), p.pollContextMsg(po)))

return nil
}