Skip to content

Commit

Permalink
Add missing s
Browse files Browse the repository at this point in the history
Closes #562
  • Loading branch information
arqunis committed May 18, 2019
1 parent c970f44 commit 3cf673e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion command_attr/src/lib.rs
Expand Up @@ -771,7 +771,7 @@ pub fn help(attr: TokenStream, input: TokenStream) -> TokenStream {
/// - `only`: String
/// Whether this group's commands are restricted to `guilds` or `dms`.
///
/// - `owner_only`: Bool
/// - `owners_only`: Bool
/// If only the owners of the bot may execute this group's commands.
///
/// - `owner_privilege`: Bool
Expand Down
20 changes: 10 additions & 10 deletions command_attr/src/structures.rs
Expand Up @@ -411,7 +411,7 @@ impl Default for HelpOptions {
pub struct GroupOptions {
pub prefixes: Vec<String>,
pub only: OnlyIn,
pub owner_only: bool,
pub owners_only: bool,
pub owner_privilege: bool,
pub help_available: bool,
pub allowed_roles: Vec<String>,
Expand All @@ -428,7 +428,7 @@ impl Default for GroupOptions {
GroupOptions {
prefixes: Vec::new(),
only: OnlyIn::default(),
owner_only: false,
owners_only: false,
owner_privilege: true,
help_available: true,
allowed_roles: Vec::new(),
Expand Down Expand Up @@ -490,13 +490,13 @@ impl Parse for GroupOptions {

options.only = only;
}
("owner_only", Expr::Lit(value))
("owners_only", Expr::Lit(value))
| ("owner_privilege", Expr::Lit(value))
| ("help_available", Expr::Lit(value)) => {
let b = value.to_bool();

if name == "owner_only" {
options.owner_only = b;
if name == "owners_only" {
options.owners_only = b;
} else if name == "owner_privilege" {
options.owner_privilege = b;
} else {
Expand Down Expand Up @@ -573,7 +573,7 @@ impl ToTokens for GroupOptions {
allowed_roles,
required_permissions,
owner_privilege,
owner_only,
owners_only,
help_available,
only,
description,
Expand Down Expand Up @@ -643,8 +643,8 @@ impl ToTokens for GroupOptions {
quote!()
};

let owner_only = if *owner_only {
quote! { owner_only: #owner_only, }
let owners_only = if *owners_only {
quote! { owners_only: #owners_only, }
} else {
quote!()
};
Expand Down Expand Up @@ -679,7 +679,7 @@ impl ToTokens for GroupOptions {
#allowed_roles
#required_permissions
#owner_privilege
#owner_only
#owners_only
#help_available
#only
#description
Expand All @@ -695,7 +695,7 @@ impl ToTokens for GroupOptions {
allowed_roles: &[#(#allowed_roles),*],
required_permissions: #permissions_path { bits: #required_permissions },
owner_privilege: #owner_privilege,
owners_only: #owner_only,
owners_only: #owners_only,
help_available: #help_available,
only: #only,
description: #description,
Expand Down
2 changes: 1 addition & 1 deletion examples/05_command_framework/src/main.rs
Expand Up @@ -82,7 +82,7 @@ group!({
group!({
name: "owner",
options: {
owner_only: true,
owners_only: true,
// Limit all commands to be guild-restricted.
only: "guilds",
// Adds checks that need to be passed.
Expand Down

0 comments on commit 3cf673e

Please sign in to comment.