Commit Graph

2704 Commits

Author SHA1 Message Date
Christopher F
623d60fe51 Merge remote-tracking branch 'origin/dev' into dev 2017-11-06 20:41:08 -05:00
Christopher F
676be4081b Ignore messages with an ID of 0 when calculating age 2017-11-06 20:40:59 -05:00
Chris Johnston
dec7cb2b5b Fix GuildPermission Modify, Add Missing Permission to AllowAll (#866)
* Use named parameters in GuildPermission constructor, fix ordering of parmeters in Modify constructor call

* fix missing constructor parameter

* Added missing Webhook permission for the all text permissions value

* Resolves #869 Add UseExternalEmojis permission to GuildPermissions.All
2017-11-05 22:06:41 -05:00
enzosk8
da335b95c4 Fix general typos (#852) 2017-11-05 22:05:19 -05:00
Alex Gravely
5218e6be97 Add IEmbed#ToEmbedBuilder extension method (#863)
* Add IEmbed#ToEmbedBuilder extension method

* Implementing reviewed changes.

* Switch to object initializers for author and footer.
2017-11-05 21:57:24 -05:00
Chris Johnston
f9963380a7 Proposed Solution for #674 Permissions Changes (#743)
* Initial commit of changes. Changed permissions from bitwise index to use bitwise flags instead. Modified relevant methods involved

* Revised enum value naming

* Added FlagsAttribute to ChannelPermission, GuildPermission

* Added comments per Joe4evr suggestion

* Added underlines to hex value digits for readability per Joe4evr suggestion

* updated names to better reflect actual permission names as per SubZero0 suggestion

* fix for 236775c2d8aca9481d6c51c674f5727f97adec04

* Replaced Math.Pow with left shift operator

* Cleaned up the formatting of ChannelPermission and GuildPermission enums to make it easier to read
2017-10-25 20:39:26 -04:00
Finite Reality
759db34146 Remove payload compression, use stream compression (#853) 2017-10-21 13:51:20 -04:00
Christopher F
14fbe40cbc Add Async suffix to command-related Tasks (#804)
commit b7fb44a94fb1e75f696f281d6b201eba3f48e864
Author: Hsu Still <341464@gmail.com>
Date:   Sat Sep 2 14:34:18 2017 +0800

    Fix more async naming violation

commit e6912e2d020c69325826dbfa62c07cd1ef2cc45f
Author: Hsu Still <341464@gmail.com>
Date:   Sat Sep 2 14:23:04 2017 +0800

    Fix incorrect null xmldocs string

commit da8d23222d207853375c3512232d1d7fd3629cad
Author: Hsu Still <341464@gmail.com>
Date:   Sat Sep 2 14:17:12 2017 +0800

    Fix CheckPreconditionsAsync

commit 992407407a42fec9087c9ed18e0bf5de30dff82c
Author: Hsu Still <341464@gmail.com>
Date:   Sat Sep 2 14:07:12 2017 +0800

    Add Async suffix to abstract Task methods
2017-10-09 19:45:12 -04:00
Vollrat
71e8b88514 Improve upon Property Summaries in CommandServiceConfig (#839)
* Improve Boolean Property Summaries

Having the `CaseSensitiveCommands` property summary asking a question whenever Intellisense is invoked seems a bit nonessential instead of *properly* explaining what exactly it does. It would be better if instead, it stated it's use to be more comprehensible to the reader.

### Changes

- Edits the summaries of `CaseSensitiveCommands` and `ThrowOnError` to follow a more methodical convention for boolean property summaries (`Determines whether X ...` rather than `Should X be ... ?`).

This is just a small change to improve upon the current documentation, so it shouldn't conflict with anything.

* "DefaultRunMode should also be "Gets or sets blah blah blah" to be consistent."
2017-10-03 20:04:38 -04:00
Alex Gravely
e00f17fe55 Move DeleteMessagesAsync from IMessageChannel to ITextChannel (#829) 2017-10-01 15:37:13 -04:00
Christopher F
347c5a0d39 Disable obsolete warnings in files that reference TokenType.User 2017-09-29 17:37:07 -04:00
Chris Johnston
f8108871d6 Typo fix for SocketGuildUser.Hierarchy description (#831) 2017-09-28 16:26:23 -04:00
Alex Gravely
9b7afec4cc Add BaseSocketClient object. (#773)
* Add BaseDiscordClient. Add various missing RequestOptions args.

DiscordSocketClient and DiscordShardedClient's shared members now exist in this abstract class.

* Add ShardReady event.

* Style consistency. Remove extraneous overloads.

Remove extraneous overloads.

* Add BaseSocketClient#DownloadUsersAsync().

Style cleanups.

* Add ShardLatencyUpdated event.

Style cleanup.

* Hook LatencyUpdated for ShardedClient.

* Begone whitespace.

* I'm good at this, I swear. >_>

* Add back DiscordShardedClient.UserPresenceUpdated

* Add ObsoleteAttribute

* Removing the UserPresenceUpdated event.
2017-09-27 18:20:31 -04:00
Christopher F
fc5adca94e Obsolete TokenType.User 2017-09-27 18:17:48 -04:00
Chris Johnston
30e867a183 Implement welcome message channels (#819) 2017-09-23 17:00:08 -04:00
Joe4evr
e25054bb3b Update WS4Net dependency to 0.15.0 (#812)
Also changes target to NetStandard1.3
2017-09-10 23:14:45 -04:00
Alex Gravely
ec03883e26 Create unspecified channel object for unknown channel types (#811)
* Partial fix of #810, addresses critical connection issues.

* Implement fix for REST.

* Implement fix on RestChannel.
2017-09-09 15:56:03 +01:00
Mark Gross
479361bbea Condense redundant AddField overloads in EmbedBuilder (#790)
* Remove extra AddField overload in EmbedBuilder

* Remove AddInlineField()
2017-08-29 19:38:34 -04:00
Christopher F
4846264074 Add IsNsfw to TextChannelProperties 2017-08-29 17:42:00 -04:00
Christopher F
608bc359ee Removed IChannel#Nsfw, added to ITextChannel 2017-08-29 17:26:36 -04:00
Christopher F
5d7f2fc7ec Add GetReactionUsersAsync(IEmote) overload (#731)
* Add GetReactionUsersAsync(IEmote) overload

Resolves #730

* Remove obsolete GetReactionUsersAsync(string) overload
2017-08-29 17:09:28 -04:00
Hsu Still
0de5d5b02b Added SendFileAsync (#774) 2017-08-29 16:57:47 -04:00
Joe4evr
94f7dd2ab8 Remove EmbedBuilder -> Embed implicit conversion (#801) 2017-08-29 16:51:41 -04:00
Christopher F
e991715bac Added CommandService.CommandExecuted (#747) 2017-08-29 16:50:32 -04:00
Christopher F
0fdb2d2c3b Bump version to 2.0.0-alpha 2017-08-29 16:49:44 -04:00
Izumemori
9c81ab9fe4 changed NameAttribute to work for parameter (#765) 2017-08-29 16:45:30 -04:00
Alex Gravely
cb0ff7817d Add NullableTypeReader (#785)
* Add NullableTypeReader.

Primitives now also load a NullableTypeReader<T> and any value types that get a typereader added will also have a NullableTypeReader<T> added for it.

* Remove unnecessary null check.

* Added docstrings.
2017-08-29 16:38:11 -04:00
Christopher F
4205d68b5a Don't throw when receiving a presence for a user that doesn't exist (#746) 2017-08-29 16:26:31 -04:00
Christopher F
3c1e76615e Preemptive Ratelimits should be logged under Verbose 2017-08-28 17:21:19 -04:00
Christopher F
1ffcd4bfa7 Changed Guild#DefaultChannel to resolve the first accessible channel (#777)
* Changed Guild#DefaultChannel to resolve the first accessible channel

Resolves #776

This change is inline with hammerandchisel/discord-api-docs#329

RestGuild#DefaultChannelId is now obsolete and will throw a
NotSupportedException.

* RestGuild#DefaultChannelId will fall back to the guild ID

Adding an exception here would be a breaking change, so this was agreed
to fall back to the previous behavior, which would just return the guild
ID.
2017-08-28 16:49:16 -04:00
Christopher F
182f00f8ce Reworked IChannel.IsNsfw to support the new API flag (#771)
IChannel.IsNsfw will now return false when being used on any channel
that is not an ITextChannel. When being used on an ITextChannel, this
will now account for the API flag, and fall back to the channel name.

(this is gross design, thanks discord)
2017-08-28 16:45:53 -04:00
RogueException
361bfc1a90 Bumped version to 1.1.0-alpha 2017-08-28 16:07:39 -04:00
Alex Gravely
865080add9 Fix CreateGuildAsync not sending icon stream. (#768)
* Fix CreateGuildAsync not doing anything with the input stream for the guild icon.

Also fixes an issue with potential stream types that throw a NotSupportedException when checking its properties. [Apparently, they exist.](https://github.com/dotnet/corefx/blob/master/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseStream.cs)

* Merged with old method

* Removed duplicate decl
2017-08-17 03:19:16 -03:00
Christopher F
506a6c96c9 Throw when attempting to add or remove a member's EveryoneRole (#781)
* Throw when attempting to add or remove a member's EveryoneRole

This resolves #780

* Removed braces
2017-08-17 02:59:58 -03:00
RogueException
f997089174 Try to pull DM channels from cache on CHANNEL_CREATE 2017-08-17 02:54:19 -03:00
Alex Gravely
6b5a6e7f1f Fix everyone mention. (#755)
* Update RestRole.cs

Fix everyone mention.

* Update SocketRole.cs

Fix everyone mention.

* I'm good at this, I swear.
2017-08-17 02:47:37 -03:00
Jay Malhotra
57a461c9ff NullOrEmpty -> NullOrWhiteSpace (#758)
Seeing as D.NET will warn you about an impending BadRequest if you try and send an empty field, why not make it warn about the impending BadRequest if you try and send a whitespace field?
2017-08-17 02:47:00 -03:00
Christopher F
95b78df9f0 URL-Encode reasons on Kick/Ban (#787)
This resolves #784
2017-08-17 02:43:00 -03:00
RogueException
dfcb4b39fb Allow duplicate RequireBotPermissionAttribute 2017-08-17 02:41:42 -03:00
RogueException
0a41694f01 Update Discord.Net.nuspec 2017-07-14 15:32:24 -03:00
Christopher F
8068a0ba0e Merge pull request #654 from ObsidianMinor/dev
Fixed RestGuildUser not updating inherited RestUser properties
2017-07-11 12:13:02 -04:00
Christopher F
263864f579 Bumped version to 1.0.2 2017-07-11 12:12:07 -04:00
RogueException
d27657d193 Removed hardcoded suffix from nuspec 2017-07-05 21:31:59 -03:00
Pat Murphy
d89804d7c7 Fix potential nullref in embedBuilder value setter (#734)
* Fix potential nullref in embedBuilder value setter

* Null check on footer iconUrl

* Adding checks for the other URL properties

* Adding IsNullOrUri extension

* Setting StringExtensions as internal
2017-07-05 20:56:43 -03:00
Joe4evr
8cd99beb62 Unify ShardedCommandContext with SocketCommandContext (#739)
* Make ShardedCommandContext derive from SocketCommandContext

* Explicitly re-implement ICommandContext.Client
2017-07-05 20:23:46 -03:00
Finite Reality
d2afb06942 Make the "cannot be loaded" warning fire correctly (#729)
Why am I such a bad programmer? Maybe I'm just bad with git. Maybe I'm
just bad in general. Maybe I should resign from programming.
2017-07-05 20:19:09 -03:00
Joe4evr
b6dcc9e8d8 Add back the case for ParameterPreconditions (#735) 2017-07-05 20:13:49 -03:00
Finite Reality
7597cf5baa Fix CalculateScore throwing on missing parameters (#727)
* Fix CalculateScore throwing on missing parameters

* Bump to version 1.0.1
2017-07-05 20:09:38 -03:00
Christopher F
c316b29286 Bump version to 1.0.1 2017-07-02 12:33:03 -04:00
RogueException
26bc0b300d Updated version to 1.0 2017-06-29 20:00:26 -03:00