mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 02:57:40 +08:00
message: add String for SourceType
This commit is contained in:
parent
a3c348100d
commit
e657427abd
@ -10,6 +10,21 @@ const (
|
||||
SourceGuildDirect
|
||||
)
|
||||
|
||||
func (t SourceType) String() string {
|
||||
switch t {
|
||||
case SourcePrivate:
|
||||
return "私聊"
|
||||
case SourceGroup:
|
||||
return "群聊"
|
||||
case SourceGuildChannel:
|
||||
return "频道"
|
||||
case SourceGuildDirect:
|
||||
return "频道私聊"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
// Source 消息来源
|
||||
type Source struct {
|
||||
SourceType SourceType
|
||||
|
Loading…
x
Reference in New Issue
Block a user