wife

package
v0.0.0-...-d990dd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Package wife From "github.com/MoYoez/Lucy_zerobot"

Index

Constants

This section is empty.

Variables

View Source
var GlobalTimeManager = rate.NewManager[int64](time.Hour*12, 6)
View Source
var LeaveTimeManager = rate.NewManager[int64](time.Hour*12, 4)

Functions

func AddBlackList

func AddBlackList(db *sql.Sqlite, userID int64, targetID int64) error

AddBlackList add blacklist

func AddDisabledList

func AddDisabledList(db *sql.Sqlite, userID int64, groupID int64) error

AddDisabledList add disabledList

func AddOrderToList

func AddOrderToList(db *sql.Sqlite, userID int64, targetID int64, time string, groupID int64) error

AddOrderToList add order.

func CheckDisabledListIsExistedInThisGroup

func CheckDisabledListIsExistedInThisGroup(db *sql.Sqlite, userID int64, groupID int64) bool

CheckDisabledListIsExistedInThisGroup Check this group.

func CheckTheBlackListIsExistedToThisPerson

func CheckTheBlackListIsExistedToThisPerson(db *sql.Sqlite, userID int64, targetID int64) bool

CheckTheBlackListIsExistedToThisPerson check the person is blocked.

func CheckTheOrderListAndBackDetailed

func CheckTheOrderListAndBackDetailed(userID int64, groupID int64) (chance int, target int64, time string)

CheckTheOrderListAndBackDetailed Check this and reply some details

func CheckThePairKey

func CheckThePairKey(db *sql.Sqlite, uid int64, groupID int64) string

CheckThePairKey Check this pair key

func CheckTheTargetUserStatusAndDoRepeat

func CheckTheTargetUserStatusAndDoRepeat(ctx *rei.Ctx, ChooseAPerson int64) bool

CheckTheTargetUserStatusAndDoRepeat Check the target status and do repeats.

func CheckTheUserIsInBlackListOrGroupList

func CheckTheUserIsInBlackListOrGroupList(userID int64, targetID int64, groupID int64) bool

CheckTheUserIsInBlackListOrGroupList Check this user is in list?

func CheckTheUserIsTargetOrUser

func CheckTheUserIsTargetOrUser(db *sql.Sqlite, ctx *rei.Ctx, userID int64) (statuscode int64, targetID int64)

CheckTheUserIsTargetOrUser check the status.

func CheckTheUserStatusAndDoRepeat

func CheckTheUserStatusAndDoRepeat(ctx *rei.Ctx) bool

CheckTheUserStatusAndDoRepeat If ture, means it no others (Only Refer to current user.)

func CustomRemoveUserGlobalMarryList

func CustomRemoveUserGlobalMarryList(db *sql.Sqlite, pairKey string, groupID int64, statusID int64) bool

CustomRemoveUserGlobalMarryList just remove it,it will persist the key (referKeyStatus)

func DeleteBlackList

func DeleteBlackList(db *sql.Sqlite, userID int64, targetID int64) error

DeleteBlackList delete blacklist.

func DeleteDisabledList

func DeleteDisabledList(db *sql.Sqlite, userID int64, groupID int64) error

DeleteDisabledList delete disabledlist.

func FindStrings

func FindStrings(list []string, searchString string) []string

FindStrings find the strings in list.

func GenerateMD5

func GenerateMD5(userID int64, targetID int64, groupID int64) string

GenerateMD5 Generate MD5

func GenerateUserImageLink(ctx *rei.Ctx, uid int64) string

GenerateUserImageLink Generate Format Link.

func GetSomeRanDomChoiceProps

func GetSomeRanDomChoiceProps(ctx *rei.Ctx) int64

GetSomeRanDomChoiceProps get some props chances to make it random.

func GetTheGroupList

func GetTheGroupList(gid int64) (list [][2]string, num int)

GetTheGroupList Get this group.

func GetUserListAndChooseOne

func GetUserListAndChooseOne(ctx *rei.Ctx) int64

GetUserListAndChooseOne choose people.

func GlobalCDModelCost

func GlobalCDModelCost(ctx *rei.Ctx) bool

GlobalCDModelCost cd timeManager

func GlobalCDModelCostLeastReply

func GlobalCDModelCostLeastReply(ctx *rei.Ctx) int

GlobalCDModelCostLeastReply Get the existed Token.

func InsertUserGlobalMarryList

func InsertUserGlobalMarryList(db *sql.Sqlite, groupID int64, UserID int64, targetID int64, StatusID int64, PairKeyRaw string) error

InsertUserGlobalMarryList no check,use it with caution // Only insert and do nothing.

func LeaveCDModelCost

func LeaveCDModelCost(ctx *rei.Ctx) bool

LeaveCDModelCost cd timeManager

func LeaveCDModelCostLeastReply

func LeaveCDModelCostLeastReply(ctx *rei.Ctx) int

LeaveCDModelCostLeastReply Get the existed Token.

func RemoveOrderToList

func RemoveOrderToList(db *sql.Sqlite, userID int64, groupID int64) error

RemoveOrderToList remove it.

func RemoveUserGlobalMarryList

func RemoveUserGlobalMarryList(db *sql.Sqlite, pairKey string, groupID int64) bool

RemoveUserGlobalMarryList just remove it,it will persist the key and change it to Type4.

func ReplyMeantMode

func ReplyMeantMode(header string, referTarget int64, statusCodeToPerson int64, ctx *rei.Ctx)

ReplyMeantMode format the reply and clear.

func ResetToInitalizeMode

func ResetToInitalizeMode()

ResetToInitalizeMode delete marrylist (pairkey | grouplist)

func ResuitTheReferUserAndMakeIt

func ResuitTheReferUserAndMakeIt(ctx *rei.Ctx, dict map[string][]string, EventUser int64, TargetUser int64)

ResuitTheReferUserAndMakeIt Result For Married || be married,

func TrackerCallFuncGetUserListAndChooseOne

func TrackerCallFuncGetUserListAndChooseOne(ctx *rei.Ctx) int64

Types

type BlackListStruct

type BlackListStruct struct {
	BlackList int64 `db:"blacklist"`
}

BlackListStruct (Example: blacklist_1292581422)

func FormatBlackList

func FormatBlackList(blockID int64) *BlackListStruct

FormatBlackList Format BlackList

type ChosenList

type ChosenList struct {
	IdentifyID string `db:"id"`
	UserID     int64  `db:"userid"`
	TargetName string `db:"targetname"`
	TargetID   int64  `db:"targetid"`
}

ChosenList User Refer To Theirs username and save it by using the quick additon (table: chosenList) be careful that it's global.

type DisabledListStruct

type DisabledListStruct struct {
	DisabledList int64 `db:"disabledlist"`
}

DisabledListStruct (Example: disabled_1292581422)

func FormatDisabledList

func FormatDisabledList(disabledID int64) *DisabledListStruct

FormatDisabledList Format DisabledList

type GlobalDataStruct

type GlobalDataStruct struct {
	PairKey  string `db:"pairkey"`
	UserID   int64  `db:"userid"`
	TargetID int64  `db:"targetid"`
	Time     string `db:"time"`
}

GlobalDataStruct (Example: grouplist_1292581422 )

func FormatInsertUserGlobalMarryList

func FormatInsertUserGlobalMarryList(UserID int64, targetID int64, PairKeyRaw string) *GlobalDataStruct

FormatInsertUserGlobalMarryList Format Insert

type OrderListStruct

type OrderListStruct struct {
	OrderPerson  int64  `db:"order"`
	TargerPerson int64  `db:"target"`
	Time         string `db:"time"`
}

OrderListStruct (Example: orderlist_1145141919180)

func FormatOrderList

func FormatOrderList(orderPersonal int64, targetPersonal int64, time string) *OrderListStruct

FormatOrderList Format OrderList

type PairKeyStruct

type PairKeyStruct struct {
	PairKey  string `db:"pairkey"`
	StatusID int64  `db:"statusid"`
}

PairKeyStruct pairkey is used to check the list.

func FormatPairKey

func FormatPairKey(PairKeyRaw string, statusID int64) *PairKeyStruct

FormatPairKey Format PairKey

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL