1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

message: add String for SourceType

This commit is contained in:
wdvxdr 2022-08-31 21:59:48 +08:00
parent a3c348100d
commit e657427abd

View File

@ -10,6 +10,21 @@ const (
SourceGuildDirect SourceGuildDirect
) )
func (t SourceType) String() string {
switch t {
case SourcePrivate:
return "私聊"
case SourceGroup:
return "群聊"
case SourceGuildChannel:
return "频道"
case SourceGuildDirect:
return "频道私聊"
default:
return "unknown"
}
}
// Source 消息来源 // Source 消息来源
type Source struct { type Source struct {
SourceType SourceType SourceType SourceType