Skip to content

Commit dd3fc48

Browse files
committed
Update github documents; Readme and contributing
1 parent 3bd22c7 commit dd3fc48

File tree

5 files changed

+137
-77
lines changed

5 files changed

+137
-77
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Desktop (please complete the following information):**
23+
- OS: [e.g. Windows (with version), Linux (with kernel version)]
24+
- Dart version [e.g. 2.14.0]
25+
- Nyxx version [e.g. 3.0.0]
26+
- nyxx_lavalink version [e.g. 3.0.0]
27+
28+
**Additional context**
29+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
4+
5+
Use smart commits here to manipulate issues (eg. Fixes #issue)
6+
7+
## Connected issues & potential other potential problems
8+
9+
If changes are connected to other issues or are affecting code in other parts of framework
10+
(e.g. in main package or any subpackage) make sure to link and describe where and why problem could be present
11+
12+
## Type of change
13+
14+
Please delete options that are not relevant.
15+
16+
- [ ] Bug fix (non-breaking change which fixes an issue)
17+
- [ ] New feature (non-breaking change which adds functionality)
18+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
19+
20+
# Checklist:
21+
22+
- [ ] Ran `dart analyze` or `make analyze` and fixed all issues
23+
- [ ] Ran `dart format --set-exit-if-changed -l 160 ./lib` or `make format` and fixed all issues
24+
- [ ] I have performed a self-review of my own code
25+
- [ ] I have commented my code, particularly in hard-to-understand areas
26+
- [ ] I have made corresponding changes to the documentation
27+
- [ ] I have added tests that prove my fix is effective or that my feature works
28+
- [ ] I have checked my changes haven't lowered code coverage

CONTRIBUTING.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contributing
2+
Nyxx is free and open-source project, and all contributions are welcome and highly appreciated.
3+
However, please conform to the following guidelines when possible.
4+
5+
## Branches
6+
7+
Repo contains few main protected branches:
8+
- `main` - for current stable version. Used for releasing new versions
9+
- `dev` - for changes for next minor or patch version release
10+
- `next` - for changes for next major version release
11+
12+
## Development cycle
13+
14+
All changes should be discussed beforehand either in issue or pull request on github
15+
or in a discussion in our Discord channel with library regulars or other contributors.
16+
17+
All issues marked with 'help-needed' badge are free to be picked up by any member of the community.
18+
19+
### Pull Requests
20+
21+
Pull requests should be descriptive about changes that are made.
22+
If adding new functionality or modifying existing, documentation should be added/modified to reflect changes.
23+
24+
## Coding style
25+
26+
We attempt to conform [Effective Dart Coding Style](https://dart.dev/guides/language/effective-dart/style) where possible.
27+
However, code style rules are not enforcement and code should be readable and easy to maintain.
28+
29+
**One exception to rules above is line limit - we use 160 character line limit instead of 80 chars.**

README.md

+31-77
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,39 @@
11
# nyxx_lavalink
22

3-
[![pub](https://img.shields.io/pub/v/nyxx_lavalink.svg)](https://pub.dartlang.org/packages/nyxx_lavalink)
4-
[![documentation](https://img.shields.io/badge/Documentation-nyxx_lavalink-yellow.svg)](https://www.dartdocs.org/documentation/nyxx_lavalink/latest/)
3+
[![Discord Shield](https://discordapp.com/api/guilds/846136758470443069/widget.png?style=shield)](https://discord.gg/nyxx)
4+
[![pub](https://img.shields.io/pub/v/nyxx.svg)](https://pub.dartlang.org/packages/nyxx_lavalink)
5+
[![documentation](https://img.shields.io/badge/Documentation-nyxx_interactions-yellow.svg)](https://www.dartdocs.org/documentation/nyxx_lavalink/latest/)
56

67
Simple, robust framework for creating discord bots for Dart language.
78

89
<hr />
910

1011
### Features
1112

12-
- **Slash commands support** <br>
13-
Supports and provides easy API for creating and handling slash commands
14-
- **Commands framework included** <br>
15-
A fast way to create a bot with command support. Implementing the framework is simple - and everything is done automatically.
1613
- **Lavalink support** <br>
1714
Nyxx allows you to create music bots by adding support to [Lavalink](https://github.com/freyacodes/Lavalink) API
18-
- **Cross Platform** <br>
19-
Nyxx works on the command line, in the browser, and on mobile devices.
2015
- **Fine Control** <br>
2116
Nyxx allows you to control every outgoing HTTP request or WebSocket message.
22-
- **Complete** <br>
23-
Nyxx supports nearly all Discord API endpoints.
24-
2517

2618
## Quick example
2719

28-
Basic usage:
29-
```dart
30-
void main() {
31-
final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);
32-
33-
bot.onMessageReceived.listen((event) {
34-
if (event.message.content == "!ping") {
35-
event.message.channel.sendMessage(MessageBuilder.content("Pong!"));
36-
}
37-
});
38-
}
39-
```
40-
41-
Slash commands:
42-
```dart
43-
void main() {
44-
final bot = Nyxx("<%TOKEN%>", GatewayIntents.allUnprivileged);
45-
Interactions(bot)
46-
..registerSlashCommand(
47-
SlashCommandBuilder("hi", "This is example slash command", [])
48-
..registerHandler((event) async {
49-
await event.acknowledge();
50-
51-
await event.respond(MessageBuilder.content("Hello World!"));
52-
})
53-
);
54-
}
55-
```
56-
57-
Commands:
58-
```dart
59-
void main() {
60-
final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);
61-
62-
Commander(bot, prefix: "!!!")
63-
..registerCommand("ping", (context, message) => context.reply(MessageBuilder.content("Pong!")));
64-
}
65-
```
66-
6720
Lavalink
6821
```dart
6922
void main() async {
70-
final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);
23+
final bot = NyxxFactory.createNyxxWebsocket("<TOKEN>", GatewayIntents.allUnprivileged);
24+
7125
final guildId = Snowflake("GUILD_ID");
7226
final channelId = Snowflake("CHANNEL_ID");
73-
74-
final cluster = Cluster(bot, Snowflake("BOT_ID"));
75-
27+
28+
final cluster = ICluster.createCluster(bot, Snowflake("BOT_ID"));
7629
await cluster.addNode(NodeOptions());
77-
78-
bot.onMessageReceived.listen((event) async {
30+
31+
bot.eventsWs.onMessageReceived.listen((event) async {
7932
if (event.message.content == "!join") {
80-
final channel = await bot.fetchChannel<VoiceGuildChannel>(channelId);
33+
final channel = await bot.fetchChannel<IVoiceGuildChannel>(channelId);
8134
8235
cluster.getOrCreatePlayerNode(guildId);
83-
36+
8437
channel.connect();
8538
} else {
8639
final node = cluster.getOrCreatePlayerNode(guildId);
@@ -93,44 +46,45 @@ void main() async {
9346
}
9447
```
9548

96-
## More examples
97-
98-
Nyxx examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx/example).
49+
## Other nyxx packages
9950

100-
Commander examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx_commander/example)
51+
- [nyxx](https://github.com/nyxx-discord/nyxx)
52+
- [nyxx_interactions](https://github.com/nyxx-discord/nyxx_interactions)
53+
- [nyxx_extensions](https://github.com/nyxx-discord/nyxx_extensions)
54+
- [nyxx_commander](https://github.com/nyxx-discord/nyxx_commander)
55+
- [nyxx_pagination](https://github.com/nyxx-discord/nyxx_pagination)
10156

102-
Slash commands (interactions) examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx_interactions/example)
57+
## More examples
10358

104-
Lavalink examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx_lavalink/example)
59+
Nyxx examples can be found [here](https://github.com/nyxx-discord/nyxx_lavalink/tree/dev/example).
10560

10661
### Example bots
10762
- [Running on Dart](https://github.com/l7ssha/running_on_dart)
108-
- [Lavalink testbot](https://github.com/AlvaroMS25/nyxx_lavalink_testbot)
10963

11064
## Documentation, help and examples
11165

112-
**Dartdoc documentation is hosted on [pub](https://www.dartdocs.org/documentation/nyxx/latest/).
113-
This wiki just fills gap in docs with more descriptive guides and tutorials.**
66+
**Dartdoc documentation for latest stable version is hosted on [pub](https://www.dartdocs.org/documentation/nyxx_lavalink/latest/)**
67+
68+
#### [Docs and wiki](https://nyxx.l7ssha.xyz)
69+
You can read docs and wiki articles for latest stable version on my website. This website also hosts docs for latest
70+
dev changes to framework (`dev` branch)
71+
72+
#### [Official nyxx discord server](https://discord.gg/nyxx)
73+
If you need assistance in developing bot using nyxx you can join official nyxx discord guild.
11474

11575
#### [Discord API docs](https://discordapp.com/developers/docs/intro)
11676
Discord API documentation features rich descriptions about all topics that nyxx covers.
11777

11878
#### [Discord API Guild](https://discord.gg/discord-api)
11979
The unofficial guild for Discord Bot developers. To get help with nyxx check `#dart_nyxx` channel.
12080

121-
#### [Dartdocs](https://www.dartdocs.org/documentation/nyxx/latest/)
81+
#### [Dartdocs](https://www.dartdocs.org/documentation/nyxx_lavalink/latest/)
12282
The dartdocs page will always have the documentation for the latest release.
12383

124-
#### [Dev docs](https://nyxx.l7ssha.xyz)
125-
You can read about upcoming changes in the library on my website.
126-
127-
#### [Wiki](https://github.com/l7ssha/nyxx/wiki)
128-
Wiki documentation are designed to match the latest Nyxx release.
129-
13084
## Contributing to Nyxx
13185

132-
Read [contributing document](https://github.com/l7ssha/nyxx/blob/development/CONTRIBUTING.md)
86+
Read [contributing document](https://github.com/l7ssha/nyxx_lavalink/blob/development/CONTRIBUTING.md)
13387

134-
## Credits
88+
## Credits
13589

136-
* [Hackzzila's](https://github.com/Hackzzila) for [nyx](https://github.com/Hackzzila/nyx).
90+
* [Hackzzila's](https://github.com/Hackzzila) for [nyx](https://github.com/Hackzzila/nyx).

0 commit comments

Comments
 (0)