Commit Graph

2241 Commits

Author SHA1 Message Date
Christopher F
3b8434cdc4 Merge pull request #715 from Joe4evr/patch-2
PreconditionGroup quick fix
2017-06-28 13:02:58 -04:00
Christopher F
daae56e37e Merge remote-tracking branch 'origin/dev' into dev 2017-06-27 08:49:53 -04:00
Christopher F
1d612f15c8 ToString on types of IEmote should return a chat formatted string 2017-06-27 08:49:46 -04:00
FiniteReality
107f1b5803 Add 'tweet' embed type 2017-06-24 22:09:46 +01:00
Joe4evr
cc390f03de Fix the off-chance that someone has a property without a getter 2017-06-24 02:56:57 +02:00
Joe4evr
34917a35de In my defense, it was 2:40 AM 2017-06-24 02:50:30 +02:00
Joe4evr
444868b22d Fix attempting to inject into static properties 2017-06-24 02:39:15 +02:00
Joe4evr
36ed2b49f0 PreconditionGroup quick fix
It didn't make much sense
2017-06-23 20:46:59 +02:00
Christopher F
ea685b4f23 Add 'article' EmbedType 2017-06-23 14:33:41 -04:00
Alex Gravely
707ec95717 Add SocketRole.Members property (#659)
* Add SocketRole.Members property

* Change Members to IEnumerable.
2017-06-23 12:01:44 -03:00
Amir Zaidi
d088d7b05c Add packetLoss argument for PCM streams, change FrameBytes to FrameSamplesPerChannel in OpusEncodeStream (#677) 2017-06-23 11:48:42 -03:00
Christopher F
256af0b269 Merge remote-tracking branch 'origin/issues/667' into dev 2017-06-23 10:42:19 -04:00
Pat Murphy
5601d00285 Add various property validation in EmbedBuilder (#711)
* Add various property validation in EmbedBuilder

* Embed URI changes

Changes property types for any URLs in Embeds to System.URI.
Adding field name/value null/empty checks.

* including property names in argumentexceptions

* Adds overall embed length check
2017-06-23 11:29:55 -03:00
Christopher F
5f04e2beba Cache outgoing presence data if disconnected (#705)
This resolves #702
2017-06-23 11:29:45 -03:00
Christopher F
fb0a056d76 Add IUser#SendMessageAsync extension (#706)
* Add IUser#SendMessageAsync extension

* Add ConfigureAwait
2017-06-23 11:29:39 -03:00
Finite Reality
cce572c600 Include names in command builder exceptions (#663) 2017-06-23 11:28:30 -03:00
Joe4evr
4a9c8168a9 Add grouping of preconditions to allow for flexible precondition logic. (#672)
* Add grouping of preconditions to allow for flexible precondition logic.

* Fix checking Module Preconditions twice (and none of the command's own)

* Fix command preconditions group 0 looping over every other precondition anyway #whoopsies

* Use custom message when a non-zero Precondition Group fails.

* Fix doc comment rendering.

* Refactor loops into local function

* Considering a new result type

* Switch to IReadOnlyCollection<T> and fix compiler errors

* Revert PreconditionResult -> IResult in return types - Change PreconditionResult to a class that PreconditionGroupResult inherits.

* Feedback on property name.

* Change grouping type int -> string

* Explicitly use an ordinal StringComparer

* Full stops on error messages

* Remove some sillyness.

* Remove unneeded using.
2017-06-23 11:28:22 -03:00
Christopher F
33e765f8f5 Use StringEnum converter in API model 2017-06-17 19:00:22 -04:00
FiniteReality
0550006d56 Change wording of permission preconditions
Also fix an issue where RequireBotPermission may throw if used in a
non-guild channel which required guild permissions.
2017-06-17 15:10:35 +01:00
Christopher F
0708bc5d48 Add EmbedType enum 2017-06-16 22:39:40 -04:00
Christopher F
1942637380 Merge pull request #656 from AntiTcb/fix/GetDMChannelAsync
Remove IUser.CreateDMChannelAsync / Fix SocketGlobalUser.DMChannel
2017-06-16 21:22:56 -04:00
AntiTcb
fb57a61432 Rename to GetOrCreateDMChannelAsync 2017-06-16 20:43:50 -04:00
Alex Gravely
8c2a46e9e7 Add ulong overload to IMessageChannel.DeleteMessagesAsync (#649) 2017-06-15 12:05:41 -03:00
Christopher F
23eda77f95 Merge pull request #680 from BlockBuilder57/patch-1
Add newest verification level
2017-06-15 10:44:59 -04:00
Izumemori
1d096a7fc5 Fix spelling 2017-06-13 01:58:54 +02:00
BlockBuilder57
2ef53330fb Add newest verification level
Users must have a verified phone on their Discord account.

http://i.imgur.com/BexDgzS.png
2017-05-29 13:33:28 -05:00
AntiTcb
73611d1fab Remove IUser.CreateDMChannelAsync, implicitly implement IUser.GetDMChannelAsync 2017-05-27 14:47:12 -04:00
RogueException
8eb9b2071c Set hasHeader in SodiumEncrypt 2017-05-25 21:45:41 -03:00
RogueException
333881a711 Expose audio header more often 2017-05-25 13:54:57 -03:00
AntiTcb
7db38f32bb Attach/Remove DMChannel to SocketGlobalUser.DMChannel property 2017-05-16 20:04:25 -04:00
AntiTcb
33a91ba3de Remove redundant explicit interface definition. 2017-05-16 20:03:38 -04:00
AntiTcb
aeef5d0893 Update DM channel on entity updates. 2017-05-16 20:03:17 -04:00
AntiTcb
6fed78025c Create DM channel if one does not exist. 2017-05-16 20:02:32 -04:00
RogueException
c01769ef4a Updated version to 1.0.0-rc3 2017-05-11 00:03:38 -03:00
RogueException
4c7fad78e1 Build promises when guild is unavailable 2017-05-10 19:28:25 -03:00
RogueException
feebcb4838 Update System.Net.Http to 4.3.2 2017-05-09 20:55:54 -03:00
RogueException
285a0e5817 Updated deps, cleaned csprojs 2017-05-09 20:51:00 -03:00
FiniteReality
1e888cde24 Fix CheckPreconditions giving empty service provider
Parameter preconditions were always getting the empty service provider,
even when a custom one was provided in ExecuteAsync, which means that
preconditions which use services cannot work properly.
2017-05-08 22:15:47 +01:00
FiniteReality
00895b1227 Remove CommandService.BuildServiceCollection
💥
2017-05-06 18:25:44 +01:00
Finite Reality
112a434424 Allow for case-insensitive HasStringPrefix (#644)
This was 👍'd in the dev chat, I forgot to make a PR for it (whoops!)
2017-05-06 02:39:46 -03:00
Sindre Langhus
82a413ace6 Fix for empty user objects after GUILD_MEMBER_REMOVE (#641)
* Made GetOrCreateUser always call AddRef and added check to PRESENCE_UPDATE to avoid readding users who have been removed from guilds

* Removed AddRef as per dev guild discussion
2017-05-04 13:16:33 -03:00
RogueException
870dc50a68 Fixed RequireNsfwAttribute definition 2017-05-04 13:15:51 -03:00
RogueException
4a128b326b Increment globaluser refs on private channel creation 2017-05-04 13:14:35 -03:00
RogueException
bd5ec0a29a Increment GlobalUser reference count on GuildUser creation 2017-05-04 13:09:55 -03:00
Christopher F
d189bb9748 Expose the 'fields' collection on EmbedBuilder (#603)
* remove tip in docs about SocketEntity.Discord

* Expose the 'Fields' collection on EmbedBuilder

After some discussion I decided that there was really no reason to keep this private, and it didn't really go along with the rest of the design of the EmbedBuilder.

This is NOT a breaking change.

Exposing this property should not have any negative effects.

* Don't allow EmbedBuilder's Fields to be set to null
2017-05-04 12:53:40 -03:00
Christopher F
576a52cdc6 Restructure and replace emojis with a new emote system (#619) 2017-05-04 12:52:48 -03:00
RogueException
ba1982a3f9 Replaced DependencyMap with ServiceCollection and IServiceProvider (#625) 2017-05-04 12:52:26 -03:00
Christopher F
7f1fc286cf Add IChannel.Nsfw, RequireNsfw precondition (#633)
* Add IChannel.Nsfw, RequireNsfw precondition

* Refactored IChannel.Nsfw to IsNsfw, removed NsfwUtils

Per pull-request feedback

* proper nsfw channel check
2017-05-04 12:49:32 -03:00
Sindre Langhus
90ac9027cf Replace Where+FirstOrDefault with FirstOrDefault in SocketClient (#636)
* Replace Where.FirstOrDefault with FirstOrDefault

* Replace Where+FirstOrDefault in ClientHelper
2017-04-30 21:29:12 -03:00
Bond-009
cb4f6e37f6 Overloaded AddModuleAsync with Type (#581)
* Overloaded AddModuleAsync with Type

* Overloaded RemoveModuleAsync with Type

* Use expression-bodied method for consistency
2017-04-29 04:42:47 -03:00