seyfert 2.1.1-dev-12469676992.0 → 2.1.1-dev-12471001861.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,7 +80,7 @@ class CommandContext extends basecontext_1.BaseContext {
80
80
  return this.interaction.fetchResponse();
81
81
  return (this.messageResponse = (await this.messageResponse.fetch()));
82
82
  }
83
- channel(mode = 'cache') {
83
+ channel(mode = 'flow') {
84
84
  if (this.interaction?.channel && mode === 'cache')
85
85
  return this.client.cache.adapter.isAsync ? Promise.resolve(this.interaction.channel) : this.interaction.channel;
86
86
  switch (mode) {
@@ -91,7 +91,7 @@ class CommandContext extends basecontext_1.BaseContext {
91
91
  return this.client.channels.fetch(this.channelId, mode === 'rest');
92
92
  }
93
93
  }
94
- me(mode = 'cache') {
94
+ me(mode = 'flow') {
95
95
  if (!this.guildId)
96
96
  return mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve();
97
97
  switch (mode) {
@@ -102,7 +102,7 @@ class CommandContext extends basecontext_1.BaseContext {
102
102
  return this.client.members.fetch(this.guildId, this.client.botId, mode === 'rest');
103
103
  }
104
104
  }
105
- guild(mode = 'cache') {
105
+ guild(mode = 'flow') {
106
106
  if (!this.guildId)
107
107
  return (mode === 'cache'
108
108
  ? this.client.cache.adapter.isAsync
@@ -44,12 +44,12 @@ class EntryPointContext extends basecontext_1.BaseContext {
44
44
  fetchResponse() {
45
45
  return this.interaction.fetchResponse();
46
46
  }
47
- channel(mode = 'cache') {
47
+ channel(mode = 'flow') {
48
48
  if (this.interaction.channel && mode === 'cache')
49
49
  return this.client.cache.adapter.isAsync ? Promise.resolve(this.interaction.channel) : this.interaction.channel;
50
50
  return this.client.channels.fetch(this.channelId, mode === 'rest');
51
51
  }
52
- me(mode = 'cache') {
52
+ me(mode = 'flow') {
53
53
  if (!this.guildId)
54
54
  return mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve();
55
55
  switch (mode) {
@@ -59,7 +59,7 @@ class EntryPointContext extends basecontext_1.BaseContext {
59
59
  return this.client.members.fetch(this.guildId, this.client.botId, mode === 'rest');
60
60
  }
61
61
  }
62
- guild(mode = 'cache') {
62
+ guild(mode = 'flow') {
63
63
  if (!this.guildId)
64
64
  return (mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve());
65
65
  switch (mode) {
@@ -59,12 +59,12 @@ class MenuCommandContext extends basecontext_1.BaseContext {
59
59
  fetchResponse() {
60
60
  return this.interaction.fetchResponse();
61
61
  }
62
- channel(mode = 'cache') {
62
+ channel(mode = 'flow') {
63
63
  if (this.interaction?.channel && mode === 'cache')
64
64
  return this.client.cache.adapter.isAsync ? Promise.resolve(this.interaction.channel) : this.interaction.channel;
65
65
  return this.client.channels.fetch(this.channelId, mode === 'rest');
66
66
  }
67
- me(mode = 'cache') {
67
+ me(mode = 'flow') {
68
68
  if (!this.guildId)
69
69
  return mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve();
70
70
  switch (mode) {
@@ -74,7 +74,7 @@ class MenuCommandContext extends basecontext_1.BaseContext {
74
74
  return this.client.members.fetch(this.guildId, this.client.botId, mode === 'rest');
75
75
  }
76
76
  }
77
- guild(mode = 'cache') {
77
+ guild(mode = 'flow') {
78
78
  if (!this.guildId)
79
79
  return (mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve());
80
80
  switch (mode) {
@@ -94,12 +94,12 @@ class ComponentContext extends basecontext_1.BaseContext {
94
94
  modal(body) {
95
95
  return this.interaction.modal(body);
96
96
  }
97
- channel(mode = 'cache') {
97
+ channel(mode = 'flow') {
98
98
  if (this.interaction?.channel && mode === 'cache')
99
99
  return this.client.cache.adapter.isAsync ? Promise.resolve(this.interaction.channel) : this.interaction.channel;
100
100
  return this.client.channels.fetch(this.channelId, mode === 'rest');
101
101
  }
102
- me(mode = 'cache') {
102
+ me(mode = 'flow') {
103
103
  if (!this.guildId)
104
104
  return mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve();
105
105
  switch (mode) {
@@ -109,7 +109,7 @@ class ComponentContext extends basecontext_1.BaseContext {
109
109
  return this.client.members.fetch(this.guildId, this.client.botId, mode === 'rest');
110
110
  }
111
111
  }
112
- guild(mode = 'cache') {
112
+ guild(mode = 'flow') {
113
113
  if (!this.guildId)
114
114
  return (mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve());
115
115
  switch (mode) {
@@ -82,12 +82,12 @@ class ModalContext extends basecontext_1.BaseContext {
82
82
  //@ts-expect-error
83
83
  return this.interaction.modal(body);
84
84
  }
85
- channel(mode = 'cache') {
85
+ channel(mode = 'flow') {
86
86
  if (this.interaction?.channel && mode === 'cache')
87
87
  return this.client.cache.adapter.isAsync ? Promise.resolve(this.interaction.channel) : this.interaction.channel;
88
88
  return this.client.channels.fetch(this.channelId, mode === 'rest');
89
89
  }
90
- me(mode = 'cache') {
90
+ me(mode = 'flow') {
91
91
  if (!this.guildId)
92
92
  return mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve();
93
93
  switch (mode) {
@@ -97,7 +97,7 @@ class ModalContext extends basecontext_1.BaseContext {
97
97
  return this.client.members.fetch(this.guildId, this.client.botId, mode === 'rest');
98
98
  }
99
99
  }
100
- guild(mode = 'cache') {
100
+ guild(mode = 'flow') {
101
101
  if (!this.guildId)
102
102
  return (mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve());
103
103
  switch (mode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "2.1.1-dev-12469676992.0",
3
+ "version": "2.1.1-dev-12471001861.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",