Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting guild region and verification level #132

Merged
merged 2 commits into from
Feb 26, 2016
Merged

Add support for setting guild region and verification level #132

merged 2 commits into from
Feb 26, 2016

Conversation

valleyflowerbear
Copy link
Contributor

No description provided.

type GuildParams struct {
Name string `json:"name"`
Region string `json:"region"`
VerificationLevel *int `json:"verification_level"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider using a VerificationLevel type then you can do:

type VerificationLevel uint
const (
VerificationLevelNone VerificationLevel = iota
VerificationLevelWhatever
VerificationLevelBlah
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@bwmarrin bwmarrin added the feature Feature implementation label Feb 25, 2016
@bwmarrin bwmarrin added this to the v0.12.0 milestone Feb 25, 2016
@bwmarrin
Copy link
Owner

Looking at this, I'd almost like the struct to be named GuildEditParams just to make it more clear but maybe that's just too long. thoughts?

@valleyflowerbear
Copy link
Contributor Author

Maybe we could even get rid of GuildParams and just use Guild and only set the relevant attributes, much like ChannelInviteCreate does with Invite?

@bwmarrin
Copy link
Owner

I like that :) Add if they add more things we can change we don't need to change much. Also keeps the syntax shorter.

@valleyflowerbear
Copy link
Contributor Author

Looking back on it, doing that would result in having to make Guild.VerificationLevel a *int which is then ugly to access and just makes it more confusing all around IMO. I think GuildParams are nicer

bwmarrin added a commit that referenced this pull request Feb 26, 2016
BREAKING -- Add support for setting guild region and verification level
@bwmarrin bwmarrin merged commit 226df09 into bwmarrin:develop Feb 26, 2016
@bwmarrin
Copy link
Owner

By the way, thanks a lot @nstafie I really do appreciate you helping out the project!

@valleyflowerbear
Copy link
Contributor Author

:) I got some time to add consts for the values, I'll open a new PR!

alex-j-butler pushed a commit to alex-j-butler/discordgo that referenced this pull request Nov 5, 2016
BREAKING -- Add support for setting guild region and verification level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants