Can Allaah be described as plotting etc
Question

Can Allaah be described as plotting, deceiving and betraying as in the verses (interpretation of the meaning):
“they were plotting and Allaah too was plotting”
[al-Anfaal 8:30] 
“Verily, the hypocrites seek to deceive Allaah, but it is He Who deceives them”
[al-Nisa’ 4:142]?.
Praise be to Allah.The attributes of Allaah are all attributes of perfection, pointing to the best and most perfect of meanings. Allaah says (interpretation of the meaning): 
“and for Allaah is the highest description. And He is the All-Mighty, the All-Wise”
[al-Nahl 16:60] 
“His is the highest description (i.e. none has the right to be worshipped but He, and there is nothing comparable unto Him) in the heavens and in the earth. And He is the All-Mighty, the All-Wise”
[al-Room 30:27]
Al-Sa’di said in his Tafseer (commentary) – p. 718, 1065: 
The highest description means the most perfect attributes. 
Attributes are of three types: 
1 – Attributes of perfection – in which there is no shortcoming whatsoever. These attributes apply to Allaah in absolute terms and are not limited or restricted in any way. Examples of that include His knowledge, power, hearing, seeing, mercy, etc. 
2 – Attributes which imply imperfection and shortcomings. These can never be ascribed to Allaah, such as sleeping, being unable, doing wrong or oppressing, betraying, etc. 
3 – Attributes which may be perfect or imperfect, depending on the context. These cannot be ascribed to Allaah in absolute terms, and they cannot be denied in the case of Allaah in absolute terms. If the context implies perfection then they can be ascribed to Allaah; if it implies imperfection then they cannot be ascribed to Allaah. Examples include: plotting, deceiving and mocking. 
Plotting against, betraying and mocking the enemy are attributes of perfection, because that is indicative of complete knowledge, power and might, and so on. 
But plotting against the sincere believers is an attribute of imperfection. 
Hence these characteristics are not ascribed to Allaah in absolute terms, rather they are mentioned in such a context as to indicate that these are attributes of perfection.
Allaah says (interpretation of the meaning): 
“Verily, the hypocrites seek to deceive Allaah, but it is He Who deceives them”
[al-Nisa’ 4:142]
This is deceiving the hypocrites. 
And He says (interpretation of the meaning): 
“And (remember) when the disbelievers plotted against you (O Muhammad) to imprison you, or to kill you, or to get you out (from your home, i.e. Makkah); they were plotting and Allaah too was plotting; and Allaah is the Best of those who plot”
[al-Anfaal 8:30]
This is a plot against the enemies of Allaah who were plotting against the Messenger of Allaah (peace and blessings of Allaah be upon him). 
Allaah says of the hypocrites (interpretation of the meaning):
“And when they meet those who believe, they say: ‘We believe,’ but when they are alone with their Shayaateen (devils — polytheists, hypocrites), they say: ‘Truly, we are with you; verily, we were but mocking.’
Allaah mocks at them and gives them increase in their wrong-doing to wander blindly”
[al-Baqarah 2:14-15]
This is mocking the hypocrites. 
These attributes are to be regarded as indicating perfection in this context. Hence we say that Allaah mocks the hypocrites and deceives them, and that He plots against His enemies, and so on. But it is not permissible to describe Allaah as mocking or deceiving in absolute terms, because that does not indicate perfection.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked: Can Allaah be described as plotting and named as such? 
He replied: 
Allaah cannot be described as plotting except in a limited sense; He cannot be described as such in absolute terms. Allaah says (interpretation of the meaning): 
“Did they then feel secure against the Plan of Allaah? None feels secure from the Plan of Allaah except the people who are the losers”
[al-A’raaf 7:99]
This verse indicate that Allaah has a plan or plot, which was to confound them without them realizing it. This is akin to the hadeeth narrated by al-Bukhaari: “War is deceit.” 
If it is asked: How can Allaah be described as plotting when this seems to be something  blameworthy? 
The answer is that plotting in the right circumstances may be something praiseworthy that points to the strength of the plotter, and that he is superior to his enemy. Hence Allaah cannot be described as plotting in absolute terms, and we cannot say “Allaah is a Plotter.” Rather this attribute is mentioned in a context where it is positive, such as the verses (interpretation of the meaning): 
“they were plotting and Allaah too was plotting”
[al-Anfaal 8:30] 
“So they plotted a plot, and We planned a plan, while they perceived not”
[al-Naml 27:50] 
And we cannot say in absolute terms that this cannot be ascribed to Allaah, rather in contexts where it is something positive it may be ascribed to Him, and in contexts where it is not something positive, it should not be ascribed to Him. So Allaah should not be called by a name which refers to this, so we cannot say that one of the names of Allaah is “the Plotter”. Plotting is one of His actions, because it has to do with the Will of Allaah. 
Fataawa al-Shaykh Ibn ‘Uthaymeen, 1/170. 
He was also asked: Can Allaah be described as betraying, or as deceiving, as in the verse (interpretation of the meaning): 
“Verily, the hypocrites seek to deceive Allaah, but it is He Who deceives them”
[al-Nisa’ 4:142]? 
He replied: 
With regard to betrayal, this is something that can never be ascribed to Allaah, because it is something shameful in all circumstances, and it is plotting at a time of trust, which is blameworthy. Allaah says (interpretation of the meaning): 
“But if they intend to betray you (O Muhammad), they indeed betrayed Allaah before. So He gave (you) power over them. And Allaah is All-Knower, All-Wise”
[al-Anfaal 8:71]
And He did not say: So He betrayed them. 
With regard to deceiving, it is like plotting. It may be ascribed to Allaah when it is something positive, but it cannot be ascribed to Him in absolute terms. Allaah says (interpretation of the meaning): 
“Verily, the hypocrites seek to deceive Allaah, but it is He Who deceives them”
[al-Nisa’ 4:142]
Fataawa al-Shaykh Ibn ‘Uthaymeen, 1/171 
And Allaah knows best.