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

TWITTER_TARGET_USERS cant use names starting with digits #1556

Closed
cre8tions opened this issue Dec 29, 2024 · 7 comments
Closed

TWITTER_TARGET_USERS cant use names starting with digits #1556

cre8tions opened this issue Dec 29, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@cre8tions
Copy link

If you have a twitter account starting with a number, it appears to throw an error.

To Reproduce
Modify TWITTER_TARGET_USERS in youir .env file that uses an account starting with a digit

TWITTER_TARGET_USERS="someuser,1someuser"

Expected behavior
No error should occur, and application should continue running

Screenshots
Error produced:
["⛔ Error: Twitter configuration validation failed:\nTWITTER_TARGET_USERS.2: Invalid Twitter username format"]

Additional context
It wasn't clear, but using true account names with the @ prefix was not the expected input either, although my assumption was to use them. Once I found it not working I tried different ways to use the field.

@cre8tions cre8tions added the bug Something isn't working label Dec 29, 2024
Copy link
Contributor

Hello @cre8tions! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!

@oxSaturn
Copy link
Contributor

Seems It's already fixed on the develop branch c84b33c.

@tcm390
Copy link
Collaborator

tcm390 commented Dec 31, 2024

@cre8tions please kindly try the develop branch and see if the issue is fixed

@tcm390 tcm390 closed this as completed Dec 31, 2024
@tcm390 tcm390 reopened this Dec 31, 2024
@cre8tions
Copy link
Author

cre8tions commented Dec 31, 2024

develop 20090bf seems to still have the error. I just tried it and I'm getting a different error message this time

Error: Twitter configuration validation failed: TWITTER_TARGET_USERS_4: Invalid Twitter username format

@AIFlowML
Copy link
Collaborator

AIFlowML commented Jan 2, 2025

If the latest dev is not working still we should add more debug logging.

@augchan42
Copy link
Contributor

I'll work on this, along with adding wildcard support

augchan42 added a commit to augchan42/eliza that referenced this issue Jan 4, 2025
Fix for elizaOS#1556
- Added support for Twitter usernames starting with numbers
- Added support for wildcard '*' in TWITTER_TARGET_USERS
- Fixed test discovery in test.sh to find all .test.ts files
- Updated Jest config for better ESM support

The main change allows Twitter target usernames to start with numbers and
use wildcards, matching current Twitter/X username rules. Test infrastructure
was improved to properly handle ESM modules and find all test files.

Changes:
- Updated username validation regex in Twitter client
- Added test cases for numeric usernames and wildcards
- Switched test.sh to use find for reliable test discovery
- Simplified Jest config to focus on ESM support
@shakkernerd
Copy link
Member

Already implemented in latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants