Initial commit

This commit is contained in:
eleksir
2025-05-08 18:12:52 +03:00
commit cff1b6811f
1596 changed files with 659567 additions and 0 deletions

40
internal/moon/types.go Normal file
View File

@@ -0,0 +1,40 @@
package moon
import (
"os"
"time"
)
// MyConfig describes bot config file format.
type MyConfig struct {
Name string `json:"name,omitempty"`
Token string `json:"token,omitempty"`
LogLevel string `json:"loglevel,omitempty"`
LogFile string `json:"logfile,omitempty"`
LogChats bool `json:"logchats,omitempty"`
CSign string `json:"csign,omitempty"`
DataDir string `json:"datadir,omitempty"`
}
// CasFalse describes response from api.cas.chat when user is not blacklisted.
type CasFalse struct {
Ok bool `json:"ok"`
Description string `json:"description"`
}
// CasFalse describes response from api.cas.chat when user is blacklisted.
type CasTrue struct {
Ok bool `json:"ok"`
Result struct {
Reasons []int `json:"reasons"`
Offenses int `json:"offenses"`
TimeAdded time.Time `json:"time_added"`
} `json:"result"`
}
type Chatlog struct {
LogFilePath string
File *os.File
}
/* vim: set ft=go noet ai ts=4 sw=4 sts=4: */