mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-07-30 09:40:53 +00:00
Compare commits
No commits in common. "231b4759dc81b7c87bb4743936adeb577e407081" and "5d7b2e3fd02a07e1d755212d7fe9d98507063289" have entirely different histories.
231b4759dc
...
5d7b2e3fd0
|
@ -35,15 +35,3 @@ func (c *Client) Search(guildID discord.GuildID, data SearchData) (SearchRespons
|
|||
httputil.WithSchema(c, data),
|
||||
)
|
||||
}
|
||||
|
||||
// SearchDirectMessages searches through a direct message channel.
|
||||
// SearchData.ChannelID must be a valid channel ID.
|
||||
func (c *Client) SearchDirectMessages(data SearchData) (SearchResponse, error) {
|
||||
var resp SearchResponse
|
||||
|
||||
return resp, c.RequestJSON(
|
||||
&resp, "GET",
|
||||
EndpointChannels+data.ChannelID.String()+"/messages/search",
|
||||
httputil.WithSchema(c, data),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package discord
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -162,20 +161,6 @@ func (ch Channel) Mention() string {
|
|||
return ch.ID.Mention()
|
||||
}
|
||||
|
||||
// URL generates a Discord client URL to the channel. If the channel doesn't
|
||||
// have a GuildID, it will generate a URL with the guild "@me".
|
||||
func (c Channel) URL() string {
|
||||
var guildID = "@me"
|
||||
if c.GuildID.IsValid() {
|
||||
guildID = c.GuildID.String()
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"https://discord.com/channels/%s/%s",
|
||||
guildID, c.ID.String(),
|
||||
)
|
||||
}
|
||||
|
||||
// IconURL returns the URL to the channel icon in the PNG format.
|
||||
// An empty string is returned if there's no icon.
|
||||
func (ch Channel) IconURL() string {
|
||||
|
|
Loading…
Reference in a new issue