util: default keyring service name
This commit is contained in:
parent
155f4d54f7
commit
0ee43018c1
2 changed files with 3 additions and 8 deletions
|
|
@ -84,8 +84,6 @@ func writeAuthor(b *strings.Builder, clientID discord.UserID, u discord.User) {
|
|||
|
||||
func writeReferencedMessage(b *strings.Builder, clientID discord.UserID, rm *discord.Message) {
|
||||
if rm != nil {
|
||||
rm.Content = parseMessageMentions(rm.Content, rm.Mentions, clientID)
|
||||
|
||||
b.WriteRune(' ')
|
||||
b.WriteRune('\u256D')
|
||||
b.WriteRune(' ')
|
||||
|
|
@ -101,7 +99,8 @@ func writeReferencedMessage(b *strings.Builder, clientID discord.UserID, rm *dis
|
|||
if rm.Author.Bot {
|
||||
b.WriteString("[#EB459E]BOT[-] ")
|
||||
}
|
||||
// Reset foreground
|
||||
|
||||
rm.Content = parseMessageMentions(rm.Content, rm.Mentions, clientID)
|
||||
b.WriteString(rm.Content + "[::-]\n")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,8 @@ import (
|
|||
"github.com/99designs/keyring"
|
||||
)
|
||||
|
||||
const ServiceName string = "discordo"
|
||||
|
||||
func OpenKeyringBackend() keyring.Keyring {
|
||||
kr, err := keyring.Open(keyring.Config{
|
||||
ServiceName: ServiceName,
|
||||
})
|
||||
kr, err := keyring.Open(keyring.Config{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue