This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
youys
/
Discord.Net
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
34
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
fix NRE when adding parameters thru builders (
#1946
)
pull/1948/head
Quin Lynch
GitHub
3 years ago
parent
d5f5ae132c
commit
143ca6db43
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
src/Discord.Net.Commands/Builders/ParameterBuilder.cs
+ 1
- 1
src/Discord.Net.Commands/Builders/ParameterBuilder.cs
View File
@@ -54,7 +54,7 @@ namespace Discord.Commands.Builders
if (type.GetTypeInfo().IsValueType)
DefaultValue = Activator.CreateInstance(type);
else if (type.IsArray)
type = ParameterType.GetElementType(
);
DefaultValue = Array.CreateInstance(type.GetElementType(), 0
);
ParameterType = type;
}
Write
Preview
Loading…
Cancel
Save