Commit Graph

3003 Commits

Author SHA1 Message Date
Chris Johnston
1ae42207f8 feature: Fix #1270 Add the AuthorId to MessageDeleteAuditLogData (#1271)
* Fix #1270 Add the AuthorId to MessageDeleteAuditLogData

Fix #1270

Adds the AuthorId property to MessageDeleteAuditLogData, which is set
by the TargetId in the audit log entry data.
This property is the user id that created those messages in the first place.
I am not aware of an instance of when this value would not be supplied.

* Adjust xmldoc wording
2019-05-04 17:08:46 -04:00
Still Hsu
00d3f5a8e5 feature: Add GuildMemberJoin MessageType(#1263) 2019-05-04 17:08:18 -04:00
Still Hsu
e03c5274f8 feature: Add GetCategory method (#1261) 2019-05-04 17:07:56 -04:00
Chris Johnston
9084c4214e feature: Fix #1280 Add NewsChannel Types (#1293)
* add News channel type

* remove (very outdated) todo

* add [Socket/Rest]NewsChannel types

* update TextChannel properties to include a Type optional parameter with validation

as of writing, this feature is still only available to verified guilds, which makes it impossible for testing.

* actually create the news channels when given the type

* throw NotSupportedException in News channel

throw a NotSupportedException whenever trying to use SlowModeInterval or anything related to overwrite permissions

* make RestNewsChannel throw NotSupportedException also

* remove the (untested) ability to change channel types
2019-05-04 17:07:31 -04:00
Christopher Felegy
2254a99942 meta: bump version to 2.1.0-dev 2019-05-04 17:05:26 -04:00
Casino Boyale
51618e66f2 docs: Fixed mistake in EmbedBuilder docs page (#1303) 2019-05-04 17:00:26 -04:00
Christopher Felegy
5569873717 fix: PacakgeReference belongs under an ItemGroup 2019-03-26 16:57:44 -04:00
Christopher Felegy
8003ac80e4 dep: flag IDisposableAnalyzers as private, bump version 2019-03-26 16:56:24 -04:00
Joe4evr
b2ebc03da7 fix: Initialize ImmutableArray fields (#1292) 2019-03-26 16:51:15 -04:00
Christopher Felegy
dffbc656fd meta: new readme badge 2019-03-17 13:12:23 -04:00
Christopher Felegy
6216fe3a56 ci: remove appveyor config
bon voyage
2019-03-17 13:06:16 -04:00
Christopher Felegy
2fa8df8624 ci: switch to release feed/branch 2019-03-17 13:06:16 -04:00
Christopher Felegy
f9a0d50d56 ci: the agent does not come with nuget installed 2019-03-17 13:06:16 -04:00
Christopher Felegy
4d3dcc957c ci: publish metapackage 2019-03-17 13:06:16 -04:00
Christopher Felegy
0a8f51c560 ci: use correct publish feed key 2019-03-17 13:06:16 -04:00
Christopher Felegy
35b6326889 ci: use proper nuget deploy 2019-03-17 13:06:16 -04:00
Christopher Felegy
e2ed8f1114 ci: fix deploy uri 2019-03-17 13:06:16 -04:00
Christopher Felegy
af3d61b906 test: just get rid of channel perm tests 2019-03-17 13:06:16 -04:00
Christopher Felegy
1d0de061e2 test: another one 2019-03-17 13:06:15 -04:00
Christopher Felegy
bc5d608712 test: forgot an #endif? 2019-03-17 13:06:15 -04:00
Christopher Felegy
b2295a6450 test: disable broken tests 2019-03-17 13:06:15 -04:00
Christopher Felegy
3d1cc3db7e ci: don't build Windows_build when deploy condition met 2019-03-17 13:06:15 -04:00
Christopher Felegy
0bb9097534 ci: can't have spaces either 2019-03-17 13:06:15 -04:00
Christopher Felegy
fa680209e0 ci: job cannot have a paranthesis 2019-03-17 13:06:14 -04:00
Christopher Felegy
e7d52fded1 ci: rewrite to use scripts 2019-03-17 13:06:14 -04:00
Christopher Felegy
0de7f94447 ci: variables is an index, not a fn 2019-03-17 13:06:14 -04:00
Christopher Felegy
e1bc3a3f0c ci: move condition back to root, debug deploy 2019-03-17 13:06:14 -04:00
Christopher Felegy
5d3bf981de ci: move deploy condition to deploy.yml 2019-03-17 13:06:14 -04:00
Christopher Felegy
369fb78e2f ci: remove comment? 2019-03-17 13:06:14 -04:00
Christopher Felegy
9b2bc18c5c ci: add azure pipelines 2019-03-17 13:06:13 -04:00
Paulo
049b014518 fix: Fix NRE when getting audit logs (#1256)
* Fix NullReferenceException when the webhook was deleted

* Fixing doc note

* Better documentation regarding the webhook object

Co-Authored-By: SubZero0 <pnmanjos@hotmail.com>
2019-03-16 15:05:00 -04:00
Still Hsu
2473619e63 docs: Clarify command samples (#1257)
* Clarify command samples by adding additional notes about each methods

* Add additional notes for the Program class

* Change wording on token read

* Change prefix sample to match referenced example

Co-Authored-By: Still34 <341464@gmail.com>
2019-03-16 14:49:53 -04:00
Paulo
377622b2a8 fix: Fix NullReferenceException at MESSAGE_CREATE (#1268)
After talking at the Discord.Net channel, @Quahu stated the `member` prop doesn't contain the `user` in this payload (and it's described as being a partial at https://discordapp.com/developers/docs/resources/channel#message-object).

I completed it using the `author` prop, that I believe it's the cleanest way of dealing with it (without changing the GuildMember class or the AddOrUpdateUser method).

Solves #1267
2019-03-16 14:44:36 -04:00
Chris Johnston
b80f0e84e7 docs: Use a relative path for docs index page logo (#1276)
* Use a relative path for docs index page logo

Changes the paths for the logo on the index page of the documentation
to use relative links instead of absolute ones.

The current absolute path is just fine as long as the site
is not hosted under another directory. When opening files locally
(without serving them in docfx) these images will fail to load.
In addition, if these files are served under a directory that is
not the root endpoint (like: `docs.com/stable/`) the images will
also break.

I tested these changes locally using these steps:

- Build & serve docs: `docfx docs/docfx.json --serve`
- Verify that logo shows up on index page using all 3 themes
- Open `docs/_site/index.html`
- Verify logo works on all 3 themes

* Minor grammar fix in DiscordSocketClient
2019-03-16 14:35:45 -04:00
Chris Johnston
48b327be3e fix: fix false invalidation when decoding token User Ids (#1278)
* add a util method for padding base64 strings if they are not of an expected length

* return the original string if it already contains padding, do not throw

* add tests for padding method, and for token that needs padding
2019-03-16 14:34:50 -04:00
Christopher Felegy
db50badcc4 meta: bump version to 2.0.2-dev 2019-01-09 16:11:31 -05:00
Christopher Felegy
a8c99f75bc meta: v2.0.1
happy patch friday
2019-01-04 12:04:52 -05:00
Joe4evr
feed4fd752 docs: Replace obsolete Precondition sample with something new (#1230)
* Replace obsolete Precondition sample with something new

* Feedback

Whoops. 👌

Co-Authored-By: Joe4evr <jii.geugten@gmail.com>
2019-01-04 11:56:57 -05:00
Chris Johnston
65b8c09727 fix: Only escape the closing quotation mark of non-remainder strings (#1226)
Before this change, non-remainder string arguments like @"test \n"
would escape the character 'n', even though there is no reason to.

For the purposes of the command parser, the only character(s) that
can be escaped is the closing quotation mark (typically '"').

This change only removes the backslash character from the resulting
argument if it matches the closing quotation mark. This change
does not affect remainder parameters.

For example:

@"`\\test`" now results in @"`\\test`", not @"`\test`"
@"test \n" results in @"test \n", not "test n"
2019-01-01 21:12:51 -05:00
Chris Johnston
d39bf6ed85 docs: fix the docs index page logo size (#1227)
Fixes the size of the logo on the index page of the documentation.
On mobile or small windows, this logo would be too large.

This adds a rule to the CSS for that logo that fixes it's size.
2019-01-01 20:47:19 -05:00
Christopher Felegy
205499d9ef meta: bump changelog 2018-12-31 13:39:15 -05:00
Christopher Felegy
497918edda fix: raise CommandExecuted on async errors
This resolves #1224.

Previously, raising CommandExecuted for errors was dependent on the
failed result making it back to ExecuteAsync. This is not possible with
async commands, which always pass back a succesful promise result,
rather than their fulfilled result.

This change moves the event invocation for exception'd ExecuteResults to
their source, and excludes ExecuteResult from the late event invocation
in CommandService#ExecuteAsync.
2018-12-31 13:36:30 -05:00
Casino Boyale
552f34c30e docs: Removed double hooking of CommandService log event (#1225)
* Removed double hooking of CommandService log event

The log event is already hooked in Line 38 of program.cs

* Removed redundant log method
2018-12-31 12:18:06 -05:00
Christopher Felegy
cdf60d5c99 meta: bump version to 2.0.1-dev 2018-12-28 21:29:34 -05:00
Christopher Felegy
4a3217fcab meta: v2.0.0
it's finally here
2018-12-28 15:26:38 -05:00
John Mazouri
bafdce4df6 Fix strange borders on main logo in Chrome and Firefox
An img tag gets default styling in these browsers & acts strangely when a src isn't present, and since we switch the logo with css, this can just be a div. Tested & working with all themes in Chrome & Firefox.
2018-12-28 11:54:39 -05:00
Still Hsu
0fecdf69bb docs: Documentation December Update (#1218)
* Fix broken link (#11)

* Fix typos and improve wording

* Add information for IGuildUser

+ Add GetPermission sample
+ Add ModifyAsync remarks

* Add information for IGuildChannel

+ Add ModifyAsync remarks
+ Add GetOverwritePermissionAsync examples

* Add warning for Direction.Around

* Fix indentations and references

* Move IRole.ModifyAsync sample

* Add information for IUser

+ Add example, remarks for Get(Default)AvatarUrl
+ Add example, remarks for GetOrCreateDMChannelAsync
+ Add missing remarks/summary/returns for other properties of the class

* Change verbs used in IVoiceState summary/remarks

* Add additional explanation for IGuildUser.RoleIds

* Change verbs used in IMessage summary/remarks

* Clarify IUserMessage Add/RemoveReactionAsync samples

* Fix command handler sample typo

* Add information for DiscordSocketConfig

+ Add remarks/example to the class
+ Add remarks to AlwaysDownloadUsers

* Fix documentation for SlowMode

* Add additional remarks for Guild/TextChannelProperties

* Update DocFx.Plugins.LastModified to v1.2.0
This should drastically improve docfx build time.

* Add missing dependencies

* Update DocFx.Plugins.LastModified to v1.2.1

Improve performance

* Update DocFx.Plugins.LastModified to v1.2.2

* Clarify deployment.md

+ Rewritten .NET Core deployment strategies for better clarification
    * Split deployment types into framework-dependent and self-contained
    * Clarify the benefits of using different types of publishing
    * Include a sample of how to execute dotnet application with the dotnet command in a TIP dialog for visibility

* Update post-execution article and samples

+ This change is to reflect changes made in https://github.com/RogueException/Discord.Net/pull/1164, where CommandInfo is now passed into the CommandExecuted event as an Optional<T>

* Update DocFX.Plugin.DescriptionGenerator to v1.1.1

* Adjust according to recent CommandExecuted changes

See:
+ f549da50e0
+ 6260749095

* Add further documentation for https://github.com/RogueException/Discord.Net/pull/1037

* Add partial documentation for the precondition helper class

* Include CHANGELOG.md in docs

* Revise post-execution docs
* Fix incorrect Optional<T> usage
* Indent some sample code and add a comment reminding the user that the post-execution basic sample code is not ideal.

* Streamline docs for Attachment
+ This commit also adds further explanation for why Embeds and Attachments are read-only collections

* Add further documentation for MessageActivity and MessageApplication

* Add caching-related docs to ISocketMessageChannel

* Add missing documentation inheritance for SyncPermissionsAsync

* Streamline documentation process

This is done by changing the documentation of the implementations required by interfaces to redirect to the interface method instead (e.g., SocketDMChannel#GetMessagesAsync refer to IMessageChannel.GetMessagesAsync within the remarks of the method).

* Cleanup 92bf8363ca

* Update src/Discord.Net.Core/Entities/Channels/Direction.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update src/Discord.Net.Core/Entities/Channels/Direction.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update src/Discord.Net.Core/Entities/Channels/GuildChannelProperties.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update src/Discord.Net.WebSocket/DiscordSocketConfig.cs

Co-Authored-By: Still34 <341464@gmail.com>

* Update according to PR suggestions

* Reword sentences of deployment article for clarification & remove mention of portability
* Fix typos/grammar errors within TextChannelProperties

* Add the logo SVG to the page navbar

* Implement changing logo image based on theme color using CSS background image

* Add a favicon

* use the purple logomark instead of white

* hack? set the title to navbar svg to read "Discord.Net Docs"
2018-12-28 08:49:02 -08:00
Christopher Felegy
2a67514e55 meta: bump metapackage to new target frameworks
we now target net46, netstd1.3, and netstd2.0... this bumps from the
previous versions of net45, netstd1.1, netstd1.3
2018-12-28 11:22:51 -05:00
Christopher Felegy
935718fa6e meta: add package logo to distributions
this resolves #1006.
2018-12-28 11:21:10 -05:00
Christopher Felegy
c6adb11a9d meta: remove rendered logo PNGs
this was done with intention to help keep the repository's working size
down, since most of these files will not be used.

rendered images have been moved online to
https://discord.foxbot.me/logo/
2018-12-23 20:03:27 -05:00