string(2430) "{
"success": true,
"user": {
"about": "",
"activity_visible": true,
"alert_optout": [],
"allow_post_profile": "members",
"allow_receive_news_feed": "everyone",
"allow_send_personal_conversation": "members",
"allow_view_identities": "everyone",
"allow_view_profile": "everyone",
"avatar_urls": {
"o": "example/data/avatars/o/0/968.jpg?1630324319",
"h": "example/data/avatars/h/0/968.jpg?1630324319",
"l": "example/data/avatars/l/0/968.jpg?1630324319",
"m": "example/data/avatars/m/0/968.jpg?1630324319",
"s": "example/data/avatars/s/0/968.jpg?1630324319"
},
"can_ban": false,
"can_converse": false,
"can_edit": false,
"can_follow": false,
"can_ignore": false,
"can_post_profile": false,
"can_view_profile": true,
"can_view_profile_posts": true,
"can_warn": false,
"content_show_signature": true,
"creation_watch_state": "watch_email",
"custom_fields": {},
"custom_title": "",
"email": "member@bk.ru",
"email_on_conversation": true,
"gravatar": "",
"interaction_watch_state": "watch_email",
"is_admin": false,
"is_discouraged": false,
"is_moderator": false,
"is_staff": false,
"is_super_admin": false,
"last_activity": 1630771220,
"location": "",
"message_count": 0,
"profile_banner_urls": {
"l": null,
"m": null
},
"push_on_conversation": false,
"push_optout": [],
"question_solution_count": 0,
"reaction_score": 0,
"receive_admin_email": false,
"register_date": 1630324273,
"secondary_group_ids": [],
"show_dob_date": true,
"show_dob_year": false,
"signature": "",
"timezone": "Europe/Moscow",
"trophy_points": 0,
"usa_tfa": false,
"user_group_id": 2,
"user_id": 968,
"user_state": "valid",
"user_title": "\u0418\u0433\u0440\u043e\u043a",
"username": "member",
"view_url": "https://example/index.php?members/member.1/",
"visible": true,
"vote_score": 0,
"website": ""
}
}"
(main.Ucp) {
Id: (int) 59,
Text: (string) (len=13) "tetatettttt/.",
Closed: (int) 0,
Asker: (int) 380236476,
Answer: (int) 380236476
}
update_answer_id_start, err33 := db.Exec("UPDATE `ucp` SET `closed` = '1' WHERE `id` = ?", res_trim_int)
lp.MessageNew(func(_ context.Context, obj events.MessageNewObject) {
msg := obj.Message.Text
msg_from_id := obj.Message.FromID
startWith := "/close"
starts := strings.HasPrefix(msg, startWith)
if starts == true {
res_trim := strings.Trim(msg, "/close ")
if res_trim != "" {
res_answer_active_status, err35 := db.Query("SELECT `answer`, `asker`, `closed` FROM `ucp` WHERE `closed` = '0' AND (`answer` = ? OR `asker` = ?)", msg_from_id, msg_from_id)
if err35 != nil {
panic(err35)
}
for res_answer_active_status.Next() {
err36 := res_answer_active_status.Scan(&ucp.Answer, &ucp.Asker, &ucp.Closed)
if err36 != nil {
panic(err36)
}
}
if ucp.Closed == 0 {
//////////обработка сообщения
}
}
}
)}
LIST QUESTION:
ID- 19 TEXT- test
ID- 20 TEXT- hdjsksb
ID- 21 TEXT- jsjsj
ID- 22 TEXT- tetet
ID- 23 TEXT- tetete
ID- 24 TEXT- sdasd
ID- 25 TEXT- te
ID- 26 TEXT- test
ID- 27 TEXT- teasihidoah
lp.MessageNew(func(_ context.Context, obj events.MessageNewObject) {
if obj.Message.Text == "/dump" {
var str strings.Builder
res, err := db.Query("SELECT `report_id`, `content_type` FROM `xf_report` WHERE `report_state` = 'open'")
if err != nil {
panic(err)
}
for res.Next(){
err := res.Scan(&report.Report_id, &report.Content_type)
if err != nil {
panic(err)
}
str.WriteString("New Report:\r\nId - " + strconv.Itoa(report.Report_id) + " || Type - " + report.Content_type + "\r\nLink - http://cd47468.tmweb.ru/index.php?reports/" + strconv.Itoa(report.Report_id) + "/")
// messages := []string{"New Report:\r\nId - " + strconv.Itoa(report.Report_id) + " || Type - " + report.Content_type + "\r\nLink - http://cd47468.tmweb.ru/index.php?reports/" + strconv.Itoa(report.Report_id) + "/"}
//log.Println(str.String())
send, err2 := vk.MessagesSend(api.Params{
"peer_id": 2000000001,
"random_id": 0,
"message": str.String(),
})
if err2 != nil {
log.Fatal(err2)
}
spew.Dump(send)
}
}
})
// каждый new report - новое сообщение
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/New Report:
Id - 7 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/7/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/New Report:
Id - 7 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/7/New Report:
Id - 8 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/8/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/New Report:
Id - 7 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/7/New Report:
Id - 8 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/8/New Report:
Id - 9 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/9/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/New Report:
Id - 7 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/7/New Report:
Id - 8 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/8/New Report:
Id - 9 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/9/New Report:
Id - 10 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/10/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/New Report:
Id - 7 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/7/New Report:
Id - 8 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/8/New Report:
Id - 9 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/9/New Report:
Id - 10 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/10/New Report:
Id - 11 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/11/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/New Report:
Id - 7 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/7/New Report:
Id - 8 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/8/New Report:
Id - 9 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/9/New Report:
Id - 10 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/10/New Report:
Id - 11 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/11/New Report:
Id - 12 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/12/
New Report:
Id - 2 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/2/New Report:
Id - 3 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/3/New Report:
Id - 4 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/4/New Report:
Id - 5 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/5/New Report:
Id - 6 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/6/New Report:
Id - 7 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/7/New Report:
Id - 8 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/8/New Report:
Id - 9 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/9/New Report:
Id - 10 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/10/New Report:
Id - 11 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/11/New Report:
Id - 12 || Type - post
Link - http://cd47468.tmweb.ru/index.php?reports/12/New Report:
Id - 13 || Type - profile_post
Link - http://cd47468.tmweb.ru/index.php?reports/13/