For convenience I've renamed your users A, B and C.
(Q1 & Q2) Ask A, "Is B the spambot?" twice in succession.
Case 1: Two yeses
If you get two yeses, that means either A is the spambot (and the others could be anything), A is the moderator and B is the spambot, or A is the trusted user and B is the spambot (since trusted user will only make a mistake once).
In all three cases, C is not the spambot.
Now (Q3) ask C if A is the moderator.
If you get a yes, C can't be the moderator (moderator won't tell you someone else is the moderator). Since we already know C isn't the spambot, C must be the trusted user, but we don't know whether they've used their mistake or not.
Repeat the question (Q4). If it's yes again, A must be the moderator, C the trusted user (with no mistakes - o ye of little faith) and B the spambot.
If Q4 was no the second time, you have to ask again (Q5). If you get a yes (that's YNY for Q3-Q5), A must be the mod and B the spambot. If you get a no (that's YNN for Q3-Q5) then A must be the spambot and B the moderator.
If C said that no, A was not the moderator, then you have one of the three cases:
- C is moderator, A is trusted user, B is spambot
- C is moderator, A is spambot, B is trusted user
- C is trusted user (mistake in Q3), A is mod, B is spambot
Ask C the same question (Q4) to rule out the third case. If C is the trusted user, they will have used up their mistake so will say yes the second time, which proves A is mod and B is spambot.
Therefore if C says no again, you know you have one of the first two cases and C is the moderator. The moderator will tell you the truth so just ask (Q5) C who's who (e.g. "is A the spambot?") and you're done.
Case 2: Two nos
This is symmetrical to Case 1 with B and C the other way around; I've omitted it for brevity and to reduce the chance of me making a transcribing error.
Case 3: One yes, one no (order doesn't matter)
A can't be the moderator, since they've given conflicting answers. A is either the spambot or the trusted user. If they're the trusted user, they've used up their mistake and will now tell the truth (this is important).
Now ask (Q3) ask B if C is the moderator.
Case 3a: B says yes
B can't be the moderator if they tell you someone else is. We already deduced that A wasn't the moderator, so C must be the moderator. Therefore C will tell you the truth, so ask C (Q4) who's who out of the other two and you're done.
Case 3b: B says no
In this case we have one of the following cases:
- B mod, A spambot, C trusted user
- B mod, C spambot, A trusted user
- B spambot, C mod, A trusted user (because A is not mod)
- B trusted user, C mod, A spambot
In the latter three cases, note that the trusted user has made a mistake already and won't make any further mistakes.
Now ask B (Q4) if A is the spambot. Remember that B is either the spambot himself or truthful.
B says no. Since we know that B is either the spambot himself or truthful, A cannot be the spambot. We already ruled out A being the moderator in Q1-2, so A must be the trusted user. What's more, A used up their mistake in Q1 or Q2, so A must now be truthful. So we can ask (Q5) A who the other two are (e.g. "is C the spambot?") and we're done.
B says yes. We know that B is either the spambot himself or truthful, so either A or B is the spambot. We also know A is not mod. Therefore we have one of:
- A spambot, B mod, C trusted
- A spambot, B trusted, C mod
- B spambot, A trusted, C mod
Sadly, we haven't asked C any questions yet in this scenario so we can't guarantee truthfulness (they could still be a trusted user making an error).
So next (Q5) we ask C, "Is A the trusted user?"
Case 3bii-a: If we get a yes, either C is the moderator and A the trusted user, or C is the trusted user (option 1 from list in 3bii) and has now used up their mistake. Either way, C will now tell the truth, so we can use our final question (Q6) to ask "Are you the moderator?" to narrow it down between (C mod/A trusted/B spam) and (C trusted/A spam/B mod).
Case 3bii-b: If we got a no from C to "Is A the trusted user?" we know we have either:
- C mod, A spambot, B trusted user (used mistake in Q3), or
- C trusted user (no mistakes), A spambot, B mod
Either way, B won't make a mistake, so we can use our final question (Q6) to ask B if he is the moderator, which will tell us which of those two options it is.