2024-11-07 08:44:55 +00:00
|
|
|
package livenote
|
|
|
|
|
2024-11-11 08:52:09 +00:00
|
|
|
import "time"
|
|
|
|
|
2024-11-07 08:44:55 +00:00
|
|
|
type Option interface{}
|
|
|
|
|
2024-11-11 08:56:45 +00:00
|
|
|
type OptionChannel struct {
|
|
|
|
Channel string
|
|
|
|
}
|
|
|
|
|
|
|
|
func Channel(channel string) *OptionChannel {
|
|
|
|
return &OptionChannel{
|
|
|
|
Channel: channel,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-11-08 05:12:23 +00:00
|
|
|
type OptionCompare struct {
|
|
|
|
Value bool
|
2024-11-07 08:44:55 +00:00
|
|
|
}
|
|
|
|
|
2024-11-08 05:12:23 +00:00
|
|
|
func CompareObject(value bool) *OptionCompare {
|
|
|
|
return &OptionCompare{Value: value}
|
|
|
|
}
|
|
|
|
|
|
|
|
type OptionOneTimeMention struct {
|
|
|
|
Users []string
|
|
|
|
}
|
|
|
|
|
|
|
|
func OneTimeMention(users ...string) *OptionOneTimeMention {
|
|
|
|
return &OptionOneTimeMention{Users: users}
|
|
|
|
}
|
|
|
|
|
|
|
|
type OptionComment struct {
|
2024-11-07 08:44:55 +00:00
|
|
|
Text string
|
|
|
|
Users []string
|
|
|
|
}
|
2024-11-08 05:12:23 +00:00
|
|
|
|
|
|
|
func Comment(text string, users ...string) *OptionComment {
|
|
|
|
return &OptionComment{
|
|
|
|
Text: text,
|
|
|
|
Users: users,
|
|
|
|
}
|
|
|
|
}
|
2024-11-11 08:52:09 +00:00
|
|
|
|
|
|
|
type OptionTimeToLive struct {
|
|
|
|
Duration time.Duration
|
|
|
|
}
|
|
|
|
|
|
|
|
func TimeToLive(du time.Duration) *OptionTimeToLive {
|
|
|
|
return &OptionTimeToLive{Duration: du}
|
|
|
|
}
|
|
|
|
|
|
|
|
type OptionPin struct {
|
|
|
|
Value bool
|
|
|
|
}
|
|
|
|
|
|
|
|
func Pin(value bool) *OptionPin {
|
|
|
|
return &OptionPin{
|
|
|
|
Value: value,
|
|
|
|
}
|
|
|
|
}
|