// teachers I have problems with this code, when I sent !q the bot sent all questions and all choices, Please I want someone edit this bot when I sent !q sends only the first question, and when I sent !q again sends the second question . notice * I want the same command and not different *
if (data.ToLower().StartsWith("!q"))
{
con.SendRoomTextMessage(targetid, "What is the most expensive metals in the world?");
con.SendRoomTextMessage(targetid, "A - Gold \nB - iron \nC - radium .");
}
else if (data.ToLower().StartsWith("radium") == true)
{
con.SendRoomTextMessage(targetid, "true answer :d");
}
else
{
con.SendRoomTextMessage(targetid, "False answer :p");
}
if (data.ToLower().StartsWith("!q"))
{
con.SendRoomTextMessage(targetid, "What is the universal language ?");
con.SendRoomTextMessage(targetid, "A - English \nB - Arabic \nC - French .");
}
else if (data.ToLower().StartsWith("engilsh") == true)
{
con.SendRoomTextMessage(targetid, "true answer :d");
}
else
{
con.SendRoomTextMessage(targetid, "False answer :p");
}
Zezo_1 0 Newbie Poster
saad749 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.