A ton of work getting towards dms.
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.
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
package database
|
||||
|
||||
type PortalKey struct {
|
||||
ID string
|
||||
Receiver string
|
||||
ID string
|
||||
ChannelID string
|
||||
}
|
||||
|
||||
func NewPortalKey(id, channelID string) PortalKey {
|
||||
return PortalKey{
|
||||
ID: id,
|
||||
ChannelID: channelID,
|
||||
}
|
||||
}
|
||||
|
||||
func (key PortalKey) String() string {
|
||||
if key.Receiver == key.ID {
|
||||
if key.ChannelID == key.ID {
|
||||
return key.ID
|
||||
}
|
||||
return key.ID + "-" + key.Receiver
|
||||
return key.ID + "-" + key.ChannelID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user