Versions in this module Expand all Collapse all v1 v1.3.3 Jun 20, 2025 v1.3.2 Jun 5, 2025 v1.3.1 Jun 4, 2025 v1.3.0 May 21, 2025 v1.2.1 Mar 11, 2025 Changes in this version + const UserLstActive + const UserLstAll + const UserLstDistributed + const UserLstGroup + const UserLstMonthLimited + const UserLstRestricted + const UserLstTempLimited + const UserLstUnVerified + const UserLstVerified + var ErrNoService = errors.New("No service") + var ErrUnknownUserListType = errors.New("user list type error") + var ErrUserObNil = errors.New("user struct cannot be nil") v1.2.0 Mar 1, 2025 Changes in this version + const CmdCancel + const CmdFree + const CmdSwitch + var ErrNilRequest = errors.New("request is nil pointer") + var ErrUpdateFaile = errors.New("recived updated has nothing to process") + var ErrUserTempLimited = errors.New("templimited user") + var ErrWebhookSetFailed = errors.New("setting web hook failed") + var MsgCannotCap string = "MsgCannotCap" + var MsgFree = "MsgFree" + var MsgTempLimitAlert = "MsgTempLimitAlert" + var MsgTempMonth = "MsgTempMonth" + var MsgTempMonthLimited = "MsgTempMonthLimited" + var MsgTempNoLimit = "MsgTempNoLimit" + var MsgTempOver = "MsgTempOver" + var MsgTemplimit string = "templimit1" v1.0.0 Feb 9, 2025 Changes in this version + const Adminservicename + const ApiMethodAnswereInline + const ApiMethodCaptionEdit + const ApiMethodEdimgmed + const ApiMethodEditText + const ApiMethodSendMG + const ApiMethodSendPhoto + const ApiMethodSendVid + const AsGB + const AsKB + const AsMB + const BtnAbout + const BtnBack + const BtnBot + const BtnBtinfo + const BtnBuilderCreateConfig + const BtnBuilderHelp + const BtnBuy + const BtnCancle + const BtnChangeIn + const BtnChangeLogin + const BtnChangeName + const BtnChangeOut + const BtnChangeQuota + const BtnChannel + const BtnCheck + const BtnCheckInbounds + const BtnCheckOutbounds + const BtnClaim + const BtnClose + const BtnCloseConn + const BtnConfigs + const BtnConform + const BtnContinue + const BtnDelete + const BtnFaq + const BtnFullInfo + const BtnFullUsage + const BtnGetLink + const BtnGroup + const BtnHome + const BtnInfo + const BtnNext + const BtnTutorial + const BtnUsageHistory + const BtnUserInfo + const Btncommand + const BuilderPage + const Callbackservicename + const Channel + const CmdBrodcast + const CmdBuild + const CmdCap + const CmdChatSession + const CmdConfigBlocks + const CmdConfigure + const CmdContact + const CmdCreate + const CmdDistribute + const CmdEvents + const CmdGift + const CmdHelp + const CmdInfo + const CmdNull + const CmdOverview + const CmdPoints + const CmdRecheck + const CmdRefer + const CmdRefreshDb + const CmdServerInfo + const CmdSource + const CmdStart + const CmdStatus + const CmdSugess + const CmdUserInfo + const Common + const CreatePoint + const Dbbatchsize + const DefaultPoint + const Defaultservicename + const Direct + const GB + const GBtoByte + const Group + const Groupservicename + const HelpPags + const Inbound + const InfoPage + const InlineServiceName + const KB + const KBtoByte + const MB + const MBtoByte + const MaxCharacterMg + const MaxLoginLimit + const MedAudio + const MedPhoto + const MedVideo + const Outbound + const ParseHtml + const ParseMarkdown + const ParseMarkdownv2 + const SkipDelim + const Statuskicked + const Statusleft + const Statusmember + const TmpAbout + const TmpChanComeback + const TmpChannelWelcome + const TmpChatmemLeft + const TmpConQuota + const TmpConfiConfigure + const TmpConfigInfo + const TmpCrAlreadyHave + const TmpCrAvblQuota + const TmpCrInInfo + const TmpCrOutInfo + const TmpCrSendUID + const TmpDisGroup + const TmpGifSend + const TmpGroupWelcome + const TmpGrpComeback + const TmpHelpCmPage + const TmpHelpHome + const TmpHelpInfoPage + const TmpInchange + const TmpNameChange + const TmpNewUsers + const TmpNewUsersVerified + const TmpOutchange + const TmpRefHome + const TmpRefshare + const TmpRemUserst + const TmpRestrcistr + const TmpStTotal + const TmpStcallback + const TmpUserInfo + const TmpWelcomeInbox + const TmpcapQuota + const TmpcapWarn + const Tmpcapreply + const TmplBuilderHome + const TmplCommonUnverified + const TmplConfigureHome + const TmplCrSelect + const TmplEventHome + const TmplGetinfoHome + const TmplHelpBuilderHelp + const TmplHelpTuto + const TmplInInfo + const TmplInboxVerified + const TmplInboxVerifiedAgain + const TmplMonthLimited + const TmplOutInfo + const TmplPoints + const TmplRecived + const TmplUserUnverifiedStart + const TmpregularVerified + const Trojan + const UpdateTimeout + const Userservicename + const Vless + const Xraywizservicename + var ButtonSelectEmjoi string = " β " + var ErrApierror = errors.New("request not resolverd by server ") + var ErrBtnClosed = errors.New("user closed btn") + var ErrChatOrUserNofound = errors.New("chat or user not found") + var ErrClientRequestFail = errors.New("requests send failed on client side") + var ErrCommandNotfound = errors.New("command not found") + var ErrConfigNotFound = errors.New("config Notfound") + var ErrContextDead = errors.New("context cancled") + var ErrDatabaseCreate = errors.New("cannot create record") + var ErrDatabasefuncer = errors.New("database calling error") + var ErrDbnotfound = errors.New("user cannot find in db") + var ErrDbopration = errors.New("database opration or transaction failed") + var ErrInboundNotFound = errors.New("inbound Notfound") + var ErrJsonopra = errors.New("json marshling error") + var ErrMsgDisabled = errors.New("msg disabled") + var ErrNotMsgType = errors.New("type is not valid messagetype") + var ErrNotsupported = errors.New("type not supporte yet") + var ErrOnDb = errors.New("db tx failed") + var ErrOnDeactivation = errors.New("deactivation failed") + var ErrOutboundNotFound = errors.New("outbound Notfound") + var ErrQuotaExceed = errors.New("config quota exceed") + var ErrRead = errors.New("body reading error") + var ErrRecurtionExceed = errors.New("recurtion limit hit") + var ErrRequest = errors.New("request errored") + var ErrResponseMissmatch = errors.New("telegram responsed diffrent status code") + var ErrResultMalformed = errors.New("status result malformed") + var ErrServiceNotFound = errors.New("service not found") + var ErrSessioForceClose = errors.New("old session force closing errored ") + var ErrSessionExcit = errors.New("already session excist") + var ErrTgParsing = errors.New("json marshling error") + var ErrTmplRender = errors.New("render template failed") + var ErrTypeMissmatch = errors.New("iobound type not supported or invalid type") + var ErrUserCanootReciveUserCapped = errors.New("user cannot recive gifts") + var ErrUserExitDb = errors.New("user already in database") + var ErrUserGiftAlready = errors.New("user already recived or send a gift") + var ErrUserIsNotinPrivate = errors.New("user is not private") + var ErrUserIsRestricted = errors.New("restricted user") + var ErrUserMonthLimited = errors.New("this month limited for the user") + var ErrUserNotVerified = errors.New("user is not verified user") + var Erruuidcreatefailed = errors.New("uuid create failed") + var MSgRefClaimAllunsupport string = "β οΈ Claim all feature is not supported yet." + var MsOutchangesucses string = "β Outbound configuration successfully changed!" + var MsgBannedMem string = "π Bye Bye!" + var MsgBannedUser string = "π« You are a banned user. Please contact the admin to be unbanned." + var MsgBtnOffline string = "β οΈ It looks like the button is no longer online. Please restart the command π" + var MsgCallbackFaq string = "π¬ Ehema pasna na thama." + var MsgChatMemLeft string = "" + var MsgClaimCancle string = "β Claim canceled." + var MsgCoQuota string = "β Configuration quota successfully updated!" + var MsgConfUnfoun string = "βοΈ Configuration not found. Please retry." + var MsgContactCancle string = "β You have canceled the contact session. If you need assistance later, don't hesitate to reach out! π" + var MsgContactTimeover string = "β¨ Your contact time has expired. β³ Please feel free to reach out again when you're ready! π" + var MsgContextDead string = "β Context canceled. Please try again." + var MsgCrConfigIn string = "π οΈ You can create configuration blocks using the /" + CmdConfigBlocks + " command." + var MsgCrFailed string = "β Configuration creation failed. Please try again later." + var MsgCrInerr string = "β The selected inbound configuration has a fatal error." + var MsgCrLogin string = "π Please specify how many users can log in at once (max 5). Example: If you select 1, only one IP address can connect at a time." + var MsgCrLoginwarn string = "β οΈ Login limit should be between 0 and 5." + var MsgCrOuterr string = "β The selected outbound configuration has a fatal error." + var MsgCrQuotaNote string = "β οΈ Your current quota may be higher than what you can add to this configuration. This happens because your total usage for the month doesn't match the usage of existing configurations, which could be due to the deletion of a configuration." + var MsgCrdisuser string = "β οΈ You can't create configurations at the moment. You are a restricted user." + var MsgCrsuccsess string = "β You have successfully created the configuration." + var MsgDberr string = "β A database error occurred. Please try again later." + var MsgDisAlready string = "β οΈ You are already a distributed user. You can't distribute again." + var MsgDisCapped string = "β οΈ You are capped user. You can't distribute" + var MsgDisConform string = "β οΈ Are you sure? You are about to distribute all of your quota." + var MsgDisSucsess string = "β You have successfully distributed your quota. Thank you!" + var MsgDisneedVerify string = "π You need to be a verified user in order to distribute your bandwidth." + var MsgDistributeOver string = "β¨ You are no longer part of the distributed users. If you'd like to share your quota again, simply use the /distribute command. π Thank you for your valuable contribution and support! π" + var MsgGetName string = "π Please provide a name for the configuration." + var MsgGetSni string = "π Please provide your SNI (you can change this later yourself)." + var MsgGifRecnOconfig string = "β οΈ The target user does not have any created config. They need to have configs in order to receive gifts." + var MsgGifUsercap string = "β οΈ You can't send gifts as you are a capped user. Please wait until your cap is over." + var MsgGifVerify string = "π You need to be a verified user in order to send gifts." + var MsgGifrec string = "π You have received a gift from someone, so you can't send one right now." + var MsgGifreciver string = "π Alright, now send me the recipient's Telegram ID or username. If you want to cancel, send /cancel." + var MsgGifsend string = "β οΈ You have already sent a gift. You can't send any more gifts until 30 days have passed." + var MsgGiftSent string = "π You have successfully sent a gift of %v to %v. π Enjoy sharing the love!" + var MsgGiftcancle string = "β Sending the gift has been canceled." + var MsgHeloClosed string = "β Help is closed." + var MsgInAlredSelected string = "Already This Inbound selected" + var MsgInchanGeWarn string = "β οΈ Warning: Changing the inbound configuration will interrupt your connection. Ensure you update your settings accordingly. Proceed only if you know what you're doing." + var MsgInchangesucses string = "β Inbound configuration successfully changed!" + var MsgInfoNoconfigs string = "βοΈ You don't have any configurations." + var MsgInfoSelectConfig string = "π§ Select a configuration to reveal its information." + var MsgInsel string = "π₯ Select the inbound configuration to change." + var MsgInternalErr string = "β οΈ Internal VPN server error. You may need to contact the admin." + var MsgNameChangeFailed string = "β Failed to change the configuration name." + var MsgNamechangeSuc string = "β Configuration name changed successfully!" + var MsgNewName string = "βοΈ Enter a new name for the configuration." + var MsgNoInbound string = "Something Wrong Inbound Can't be found you may need to contact admin" + var MsgNoQuota = "You Don't Have Available Quota To create a new config, if you want to create a new config, you can change the quota of the existing config or delete" + var MsgNoconfigstochange string = "βοΈ You don't have any configurations to modify. Please use the /create command to set up your configurations." + var MsgNotCmdDIs string = "" + var MsgOutAlredSelected string = "Already This OUtbound selected" + var MsgOutchangeWar string = "β οΈ Warning: Changing the outbound configuration will modify your IP address." + var MsgQuotanotUsed string = "β οΈ You have not utilized 75% of your previous quota. As a result, access to the service is suspended for the next 30 days. π« Please plan your usage wisely in the future! π" + var MsgQuotawarn string = "β οΈ Your quota must be within the specified range." + var MsgQuotawarnlow string = "β οΈ Your quota must be greater than you'r current usage" + var MsgQuotawarnzero string = "β οΈ Value should be greater than zero" + var MsgRecursionExceed string = "β οΈ Too many button presses. Please do what you need to do. (ΰΆ―ΰΆΰ·ΰΆ± ΰΆ―ΰΆΰ·ΰΆ± ΰΆΰΆ ΰΆΰΆΆΰΆ±ΰ·ΰΆ± ΰΆΰΆ΄ ΰΆ»ΰ·ΰΆ½ΰ·ΰ·ΰΆΰ· ΰ·ΰΆΰ·)" + var MsgRefAlredy string = "you cant be a reffred user, you are already reffred you are refred from user id %v" + var MsgRefClaimConform string = "β Confirm to claim your referral points." + var MsgRefClaimError string = "β Error processing claim. Please try again." + var MsgRefClaimNote string = "βΉοΈ You can claim referrals as points: Verified user = 2 points, Normal user = 1 point." + var MsgRefClaimed string = "π You have claimed %v points." + var MsgRefLink string = "π Your referral link is: %v" + var MsgRefNoANyUser string = "β οΈ You don't have any referred users." + var MsgRefNoUser string = "β You don't have any verified referred users to claim. Please ask your referred user to verify, so you can claim your points." + var MsgRefNousers string = "β οΈ You don't have any referred users yet. Hurry up and refer users!" + var MsgRefOwenerNFoun string = "β οΈ Something went wrong fetching the owner of the referral. The referral owner may not be registered." + var MsgRefVerify string = "π You can't use this command unless you're a verified user. Please join the channel and group, then try again." + var MsgReferd string = "π Welcome! Youβre now a user who came from %v 's referral. π Letβs get started on this exciting journey together! π" + var MsgSelfRef string = "β You can't be your own referral." + var MsgSessionExcist string = "β οΈ A session already exists. Please close it first." + var MsgSessionFail string = "β Session creation failed. Please try again later." + var MsgSessionOver string = "β³ Your session has ended. Please try again." + var MsgSnifail string = "β SNI reception failed while creating the configuration. You can compile your config into multiple blocks using /confblocks." + var MsgStNoconfig string = "βοΈ You don't have any configurations. To get usage, please create configs using the /create command." + var MsgStVerify string = "π You are not a verified user. In order to see the status or access any Singbox services, you need to be a verified user." + var MsgSugess string = "π‘ Please share your suggestion! Weβd love to hear your thoughts and ideas. π" + var MsgSure string = "β Are you sure? Your connection will be lost." + var MsgTargetcapped string = "π« Target user is a capped user." + var MsgUsageExceed string = "β You can create configurations, but you will not be able to use them as your quota is exceeded." + var MsgUserMonthLimited string = "π« You can't use this service until your punishment period is over." + var MsgUserNotFoun string = "π€ User not found. The user may not have registered with the bot." + var MsgValidInt string = "π’ Please send a valid integer." + var MsgValidName string = "π Please send a valid name, no commands allowed." + var MsgVerifiedUser string = "π You need to be a verified user first. Please join our group and channel, then try again." + var Msgcanref string = "π’ You can also refer users and earn rewards. Use /refer for more info." + var MsgcapAlready string = "β οΈ You are already capped. You can't cap again. Please wait until your cap time limit is over." + var MsgcapCancle string = "β Capping your quota has been canceled." + var MsgcapConform string = "β οΈ You are about to cap your quota. This quota will be valid for the next 30 days." + var MsgcapRecalFail string = "β οΈ Recalculation Failed, You'r quota will update in next db refresh" + var MsgcapSuccses string = "β You have successfully capped your quota." + var MsgcapThan string = "β οΈ Please enter a value lower than your available quota." + var MsgcapUsage string = "β οΈ You have already used the cap you entered. Please enter a cap higher than your usage." + var Msgcapexced string = "β You can't cap your quota because you've already used all of your quota." + var Msgcapverify string = "π You need to be a verified user in order to distribute your bandwidth." + var Msgcapzerod string = "β οΈ The cap cannot be zero. If you want to share your total bandwidth, please use the /distribute command." + var Msgconfcannotfind string = "β Configuration not found. Something went wrong. You may need to notify the admin if this continues." + var MsgdelConnWarn string = "β οΈ Your connection will be closed." + var MsgdelFail string = "β Failed to delete the configuration." + var MsgdelSuccses string = "β Configuration deleted successfully!" + var MsgfetchUsage string = "β³ Please wait while we fetch your usage history. This may take a moment." + var Msggifterr string = "β You can't gift more than what you have." + var Msghelpnoverify string = "π This service is only available for verified users." + var MsgnoQuota string = "β οΈ You don't have available quota to add to this configuration. Please change the quota of another configuration." + var Msgoutsel string = "π€ Select the outbound configuration to change." + var MsgresetUsage string = "π All your usage has been successfully reset. β¨" + var Msgretryfail string = "π« ΰΆΈΰ·ΰΆ©ΰΆΊΰ·ΰΆΰ· ΰΆΆΰ· ΰΆ΄ΰ·ΰΆ±ΰ·ΰΆ±ΰΆ±ΰΆ± ΰ·ΰΆ―ΰΆ±ΰ·ΰΆ± ΰΆΰΆ΄ΰ·" + var MsgselectIn string = "π₯ Select an inbound configuration to create. You can change the inbound later." + var MsgselectOut string = "π€ Select an outbound configuration to create. You can change the outbound later. Tip: Users should choose the default outbound unless they have special cases. Use the /help command for more information." + var MsgserverErr string = "π¨ Something went wrong on the server. Please try again later." + var MsgstartGrpin string = "π You are already in our group. To use this service, you need to join our channel." + var Msgstartmlimited string = "β³ You didn't use 3/4 of your quota from last month, so you can't use the service for the next 30 days." + var MsgsttInChan string = "π You are already in the channel, but to use this bot, you may need to join the group." + var Msgsugessdone string = "β Suggestion submitted! π© It will be sent to the admin for review. Thank you for your input! π" + var Msgwrong string = "β Something went wrong. Please try again." + var MsgwrongtAdmmin string = "β Something went wrong. Please retry, or contact the admin with the error." + var MsgwtchErrinnotfound string = "β οΈ Your configuration encountered an error during the database refresh. Please reach out to the developer for assistance. π οΈ Error: Inbound not found." + var MsgwtchErrtypemiss string = "β οΈ Your configuration encountered an error during the database refresh. Please contact the developer for assistance. π οΈ Error: Inbound type mismatch." + var MsgwtchErruseradd string = "β οΈ Your configuration encountered an error during the database refresh. Please contact the developer for assistance. π οΈ Error: VLESS service error during user addition." + var MsgwtchUsagereset string = "π All your usage has been reset, but any excess usage has been carried over to this month. π" + var Msgxrayuse string = "π You need to be a verified user to use Xray services." + func ExcuteMap[T comparable, Y any](in map[T]Y, excuter func(v Y, key T)) + func ExcuteSlice[T any](in []T, exec func(*T)) + func GetFromSlice[T any](in []T, getter func(T) bool) *T + func GetMsg(inmg string) string + func IsInSlice[T any](in []T, check func(T) bool) bool + func LoadUserMsg() error + func MapPtrToSlicePtr[T comparable, Y any](in map[T]*Y) []*Y + func MapToSliceKey[T comparable, Y any](in map[T]Y) []T + func MapToSlicePtr[T comparable, Y any](in map[T]*Y) []Y + func MapToSlice[T comparable, Y any](in map[T]Y) []Y + func RemoveItem[T any](in []T, docompare func(T) bool) []T + func SliceToMapPtr[T comparable, Y any](in []Y, getkey func(Y) T) map[T]*Y + func SliceToMap[T comparable, Y any](in []Y, getkey func(Y) T) map[T]Y + type Bwidth float64 + func BwidthString(bwidth string) (Bwidth, error) + func ParserBwidth(i string) (Bwidth, error) + func (b Bwidth) BToString() string + func (b Bwidth) BytetoGB() Bwidth + func (b Bwidth) BytetoKB() Bwidth + func (b Bwidth) BytetoMB() Bwidth + func (b Bwidth) Float64() float64 + func (b Bwidth) GbtoByte() Bwidth + func (b Bwidth) Int() int + func (b Bwidth) Int32() int32 + func (b Bwidth) Int64() int64 + func (b Bwidth) KbtoBYte() Bwidth + func (b Bwidth) MbtoBYte() Bwidth + func (b Bwidth) String() string + type UserMsg map[string]string + var AllUserMsg UserMsg