This commit also points to my fork of discordgo which makes it look like the official client which is the only way to get the actually contents of a dm when not authorized as a bot.
21 lines
326 B
Go
21 lines
326 B
Go
package database
|
|
|
|
type PortalKey struct {
|
|
ID string
|
|
ChannelID string
|
|
}
|
|
|
|
func NewPortalKey(id, channelID string) PortalKey {
|
|
return PortalKey{
|
|
ID: id,
|
|
ChannelID: channelID,
|
|
}
|
|
}
|
|
|
|
func (key PortalKey) String() string {
|
|
if key.ChannelID == key.ID {
|
|
return key.ID
|
|
}
|
|
return key.ID + "-" + key.ChannelID
|
|
}
|