Add GatewayIntents.none; Update examples; Bump version
This commit is contained in:
parent
2ab9cd1b6e
commit
8966773ab6
|
@ -3,7 +3,7 @@ import "package:nyxx/nyxx.dart";
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance. Replace string with your token
|
// Create new bot instance. Replace string with your token
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
||||||
bot.onReady.listen((ReadyEvent e) {
|
bot.onReady.listen((ReadyEvent e) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import "package:nyxx/nyxx.dart";
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance. Replace string with your token
|
// Create new bot instance. Replace string with your token
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
||||||
bot.onReady.listen((ReadyEvent e) {
|
bot.onReady.listen((ReadyEvent e) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ DiscordColor getColorForUserFromMessage(Message message) {
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance. Replace string with your token
|
// Create new bot instance. Replace string with your token
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
||||||
bot.onReady.listen((ReadyEvent e) {
|
bot.onReady.listen((ReadyEvent e) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import "package:nyxx/nyxx.dart";
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance. Replace string with your token
|
// Create new bot instance. Replace string with your token
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
||||||
bot.onReady.listen((ReadyEvent e) {
|
bot.onReady.listen((ReadyEvent e) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ SnowflakeEntity getUserToBan(GuildMessage message) {
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance. Replace string with your token
|
// Create new bot instance. Replace string with your token
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
||||||
bot.onReady.listen((ReadyEvent e) {
|
bot.onReady.listen((ReadyEvent e) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import "package:nyxx/nyxx.dart";
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance. Replace string with your token
|
// Create new bot instance. Replace string with your token
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
||||||
bot.onReady.listen((ReadyEvent e) {
|
bot.onReady.listen((ReadyEvent e) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import "package:nyxx/nyxx.dart";
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance
|
// Create new bot instance
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
// Listen to ready event. Invoked when bot is connected to all shards. Note that cache can be empty or not incomplete.
|
||||||
bot.onReady.listen((e) {
|
bot.onReady.listen((e) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import "package:nyxx/nyxx.dart";
|
||||||
// Main function
|
// Main function
|
||||||
void main() {
|
void main() {
|
||||||
// Create new bot instance
|
// Create new bot instance
|
||||||
final bot = Nyxx("<TOKEN>");
|
final bot = Nyxx("<TOKEN>", GatewayIntents.none);
|
||||||
|
|
||||||
// Listen to ready event. Invoked when bot started listening to events.
|
// Listen to ready event. Invoked when bot started listening to events.
|
||||||
bot.onReady.listen((ReadyEvent e) {
|
bot.onReady.listen((ReadyEvent e) {
|
||||||
|
|
|
@ -143,6 +143,9 @@ class GatewayIntents {
|
||||||
|
|
||||||
/// All intents
|
/// All intents
|
||||||
static const int all = allUnprivileged | allPrivileged;
|
static const int all = allUnprivileged | allPrivileged;
|
||||||
|
|
||||||
|
/// No intents. Client shouldn't receive any events.
|
||||||
|
static const int none = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Hook executed when disposing bots process.
|
/// Hook executed when disposing bots process.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: nyxx
|
name: nyxx
|
||||||
version: 1.1.0-dev.5
|
version: 1.1.0-dev.8
|
||||||
description: A Discord library for Dart.
|
description: A Discord library for Dart.
|
||||||
homepage: https://github.com/l7ssha/nyxx
|
homepage: https://github.com/l7ssha/nyxx
|
||||||
repository: https://github.com/l7ssha/nyxx
|
repository: https://github.com/l7ssha/nyxx
|
||||||
|
@ -11,7 +11,7 @@ environment:
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
http: "^0.13.0"
|
http: "^0.13.0"
|
||||||
logging: "^1.0.0"
|
logging: "^1.0.1"
|
||||||
path: "^1.8.0"
|
path: "^1.8.0"
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
Loading…
Reference in a new issue