Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added and improved documentation (sort of finished) #111

Open
wants to merge 5 commits into
base: docs
Choose a base branch
from

Conversation

R-e-t-u-r-n-N-u-l-l
Copy link

@R-e-t-u-r-n-N-u-l-l R-e-t-u-r-n-N-u-l-l commented Aug 17, 2018

Added some new documentation for functions and improved some existing documentation.

Added some new documentation for functions and improved some existing documentation.
Added some new documentation for functions and improved some existing documentation.
Finished most of the function documentation.
@R-e-t-u-r-n-N-u-l-l R-e-t-u-r-n-N-u-l-l changed the title Added and improved documentation (not finished) Added and improved documentation (sort of finished) Aug 22, 2018
Some new examples, some improved examples; changed myClientClass to MyClientClass
public:
using SleepyDiscord::DiscordClient::DiscordClient;

void onMessage(SleepyDiscord::Message message) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use override specifier


### sendMessage
#### Other Details
[Declared in `client.h`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/client.h) and [defined in `endpoints.cpp`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/endpoints.cpp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


void onMessage(SleepyDiscord::Message message) {
if (message.content == "rules")
uploadFile(message.channelID, "res/rules.txt", "These are the rules");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one line starts with 2 tabs and 2 spaces. The line above uses 4 spaces. same goes for the main function

The Message you just sent as a Message object

#### Other Details
[Declared in `client.h`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/client.h) and [defined in `endpoints.cpp`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/endpoints.cpp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returns ``true`` on success

#### Other Details
[Declared in `client.h`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/client.h) and [defined in `endpoints.cpp`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/endpoints.cpp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

404 error

Returns ``true`` on success

#### Other Details
[Declared in `client.h`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/client.h) and [defined in `endpoints.cpp`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/endpoints.cpp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

404 error

Returns ``true`` on success

#### Other Details
[Declared in `client.h`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/client.h) and [defined in `endpoints.cpp`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/endpoints.cpp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

404 error

Returns an array of ``Role`` objects

#### Other Details
[Declared in `client.h`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/client.h) and [defined in `endpoints.cpp`](https://github.com/NoNamer64/sleepy-discord/blob/master/include/sleepy_discord/endpoints.cpp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

404 error, I think you get the point, so I'm not going to keep going without continuing to point this out

bool unbanMember(Snowflake<Server> serverID, Snowflake<User> userID);
```

Bans a member from a server
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be unbans a member


### editChannelPermissions
```cpp
bool editChannelPermissions(Snowflake<Channel> channelID, std::string ID, int allow, int deny, std::string type);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to give an example for this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants