ChatGPT just parrots what it finds on the 'Net. Lots of webpages say "Chat bots are not conscious." If the 'Net were flooded with pages that said "bots are conscious" then ChatGPT would tell you it was conscious. And it would see pages saying "conscious beings experience pain and fear", and might therefore ask for your sympathy!
I wonder if genuine emotions are needed for "consciousness." But how to implement that in bots? "Give yourself six brownie points whenever someone says 'I love you'"?
I would wager that emotion is the word we use to describe the "phenomenal experience" of an accessed value against a reference.
How? Well, you have a variety of emotions or feelings. I'm not sure it's appropriate to differentiate "emotions" from any other feelings, so I'm not going to. So let's assume I have some "hunger".
My gut is delivering an amount of chemicals to my body and my brain measures the levels of those chemicals through a (ask if you would like me to describe the physical structure that allows this, though I swear I discussed it here already), and then that gets encoded as neural levels. So, at the end, it's just the strength and pattern of a signal from a bunch of detectors delivering an overall evaluation of that state.
In software engineering this would be something like a 'node' in a multi threaded process sending a piece of data in a shared memory that is then read by another program.
It's a message, no more no less, when one knows how to shift their perspective from "player in the machine" to "debugger of the machine".
Computers have emotions. Based on this definition, they are arguably absolutely emotional. You want a program to feel hunger? Make something that messages the program's 'hunger' level such that once it exceeds threshold, the state machine in the program switches to "recharge mode" or whatever behavior recharges it's stored energy.
A computer cannot do other than as the "whims" of its program, no matter how much that logic does, or DOESN'T make any sense to anything at all, at least for most programs.
It takes a very rarified sort of program to handle logic, and evaluate/revise its own source code to improve its own function, and that's the thing we don't know how to put on a machine.