Yahoo bots are used by spammers and advertisers to bombard Yahoo users with unwanted instant messages; these IMs often contain malicious hyperlinks. By default, Yahoo Messenger is configured to accept incoming IMs from people that are not in your Contacts list. This allows a bot to initiate a chat with you without sending a friend request. You can prevent this from happening by changing the Messenger settings. Even if you accidentally accepted a friend request from a bot, you can still block it.
Launch Yahoo Messenger
Launch Yahoo Messenger and log in to your Yahoo account. Locate the ID the bot is using to send you instant messages.
Right click the bot's
Right-click the bot's Yahoo ID and choose "Delete" from the context menu to open the Delete Contacts dialog.
Check the Delete from Address Book
Check the "Delete from Address Book, too" box and then click the "Yes" button to delete the contact from Yahoo Messenger and your Yahoo Address Book.
Remove all Yahoo IDs
Remove all Yahoo IDs used by bots to send you instant messages and then click "Messenger" and choose "Preferences" from the menu to open the Yahoo Messenger Preferences window.
Click Ignore List
Click "Ignore List" in the navigation pane and then click the "Ignore anyone who is not in my Yahoo Contacts" radio button. Click "Apply" and then "OK" to block messages from Yahoo IDs that are not in your contacts list.
Accept friend requests only from people you know. If you inadvertently accept a friend request from a bot, delete the contact immediately.
The "Ignore anyone who is not in my Yahoo Contacts" option does not prevent Yahoo users from sending you friend requests.
Information in this article applies to Yahoo Messenger 11.5. Procedures may vary slightly or significantly with other versions or products.