Skip to content

Conversation

@deltaryz
Copy link
Collaborator

Techgore only works in #nerdery, function is modularized to allow other subreddit grabs
Does not log in with any login or API key (reddit doesn't require one for these kinds of simple grabs)

}

func derpi(s *discordgo.Session, m *discordgo.Message, parv []string) error {
if m.ChannelID != "292755043684450304" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this a configuration setting using an environment variable.

}

func techgore(s *discordgo.Session, m *discordgo.Message, parv []string) error {
if m.ChannelID != "193740418633039872" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this a configuration setting using an environment variable.

listOptions := geddit.ListingOptions{
Limit: 50,
}
reddit := geddit.NewSession("discordbot")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/reddit/reddit/wiki/API#rules

Prefer something like

const (
	appid = "github.com/PonyvilleFM/aura/cmd/aerial"
	version = "0.1"
)

userAgent := fmt.Sprintf(
	"%s on %s %s:%s:%s (by /u/shadowh511)",
	runtime.Version(), runtime.GOOS, runtime.GOARCH,
	appid, version,
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants