<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetGuildPollData</id>
	<title>API:GetGuildPollData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetGuildPollData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetGuildPollData&amp;action=history"/>
	<updated>2026-10-17T17:53:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetGuildPollData&amp;diff=30397&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetGuildPollData&amp;diff=30397&amp;oldid=prev"/>
		<updated>2026-10-16T19:43:54Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Guild}}&lt;br /&gt;
Returns the active alliance polls (votes) known to the client.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
polls = GetGuildPollData()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;polls : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Poll tables keyed by poll id. This is not a 1-based array: iterate with &amp;lt;code&amp;gt;pairs&amp;lt;/code&amp;gt; or index by poll id.&lt;br /&gt;
&lt;br /&gt;
Each poll table has these fields:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pollType&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Kind of poll. The stock UI compares it with &amp;lt;code&amp;gt;GuildWindow.POLL_TYPE_KICK&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;subjectID&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Id of the guild the poll is about.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;creatorID&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;maxTimer&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;votes&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Votes cast so far: keys are voter ids, values are &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; (the vote).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;locked&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;timestampCreated&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Creation time as a raw time value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dateCreatedHour24&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Hour of creation, 0–23.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dateCreatedMonth&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Month of creation, 1–12.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dateCreatedDay&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Day of the month of creation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dateCreatedYear&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Year of creation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The date fields are &amp;lt;code&amp;gt;timestampCreated&amp;lt;/code&amp;gt; converted with the computer&amp;#039;s local time zone.&lt;br /&gt;
* If the Lua state is not available, the function returns nothing.&lt;br /&gt;
* A new table is built on every call.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_guildwindow/source/guildwindowtaballiance.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local guildPollData = GetGuildPollData()&lt;br /&gt;
...&lt;br /&gt;
for pollId, pollData in pairs( guildPollData )&lt;br /&gt;
do&lt;br /&gt;
    if ( ( pollData.subjectID == guild.id ) and ( pollData.pollType == GuildWindow.POLL_TYPE_KICK ) )&lt;br /&gt;
    then&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Looking up one poll, from the same file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local guildPollData = GetGuildPollData()&lt;br /&gt;
pollData = guildPollData[pollId]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:SendGuildAllianceCommand|SendGuildAllianceCommand]]&lt;br /&gt;
* [[API:GetAllianceMemberData|GetAllianceMemberData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>