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:
Gary Kramlich
2022-01-25 23:22:20 -06:00
parent 167fdede1f
commit 680f7bdbea
15 changed files with 478 additions and 57 deletions

View File

@@ -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
}