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

Various things #5963

Merged
merged 11 commits into from
Jul 20, 2024
Merged

Various things #5963

merged 11 commits into from
Jul 20, 2024

Conversation

gc
Copy link
Collaborator

@gc gc commented Jul 20, 2024

No description provided.

Unverified

The committer email address is not verified.
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to f7861fe in 26.856203 seconds

More details
  • Looked at 221 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_tZO7W7L5DFMFtmHG


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

await userStatsBankUpdate(user, 'random_event_completions_bank', new Bank().add(event.id));
messages.push(`Did ${event.name} random event and got ${loot}`);
return {
Copy link
Contributor

Choose a reason for hiding this comment

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

The function triggerRandomEvent should not return an object with itemsToAddWithCL directly. Instead, it should handle the item transactions internally and return nothing, or it should return the items to be added and let the caller handle the transaction. This change ensures better separation of concerns and consistency with other parts of the codebase.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 7a4fc1b in 42.402017 seconds

More details
  • Looked at 130 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_83R66692TLsTA978


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -156,16 +156,6 @@ client.on('interactionCreate', async interaction => {
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing the bot's readiness and uptime check before processing interactions can lead to processing interactions when the bot is not fully operational, potentially causing errors or unexpected behavior. Consider restoring this check to ensure stability.

@@ -187,19 +187,19 @@ const cache = new LRUCache<string, number>({ max: 500 });
const doesntGetRandomEvent: activity_type_enum[] = [activity_type_enum.TombsOfAmascut];

export async function triggerRandomEvent(user: MUser, type: activity_type_enum, duration: number, messages: string[]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The change to always return an object from triggerRandomEvent could lead to issues if other parts of the code rely on the return value to determine if an event was triggered. Consider reverting this change or ensuring that all dependent code handles the new return type correctly.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on b1d6f5b in 25.457803 seconds

More details
  • Looked at 49 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_zJkdagsossBZd1df


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -156,10 +153,13 @@ client.on('interactionCreate', async interaction => {
return;
}

if (!client.isReady() || !client.uptime || client.uptime < Time.Second * 10) {
if (
Copy link
Contributor

Choose a reason for hiding this comment

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

The change to notify users and guilds when they are blacklisted could potentially alert malicious users that they are being actively blocked, which might not be desirable. Consider the implications of this change on the security and effectiveness of the blacklist feature.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on f21dab4 in 26.332001 seconds

More details
  • Looked at 51 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_CSyKwLG9Hx2V5aYi


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

import { minionKCommand } from '../../src/mahoji/commands/k';
import { createTestUser, mockClient, mockMathRandom } from './util';

test('Random Events', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The test case for 'Random Events' should include assertions to verify the actual triggering and effects of the random events, not just the outcomes like kill counts or bank updates.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on b37a096 in 20.824294 seconds

More details
  • Looked at 28 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_q9s0NHAPAfmcmNIz


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

import { preStartup } from '../../src/lib/preStartup';
import { mockClient } from './util';

test('Random Events', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The test name 'Random Events' does not accurately describe the test's purpose. Consider renaming it to reflect that it tests the preStartup function.

Suggested change
test('Random Events', async () => {
test('preStartup Initialization', async () => {

@gc gc merged commit 50bbdeb into master Jul 20, 2024
4 checks passed
@gc gc deleted the variostshings branch July 20, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant