# Totem (global functions): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/Totem

## Functions

### DestroyTotem

```lua
DestroyTotem(slot)
```

Arguments:
- `slot`: luaIndex

### GetNumTotemSlots

```lua
numSlots = GetNumTotemSlots()
```

Returns:
- `numSlots`: number

### GetTotemCannotDismiss

```lua
cannotDismiss = GetTotemCannotDismiss(slot)
```

Arguments:
- `slot`: luaIndex

Returns:
- `cannotDismiss`: bool, may be nil

### GetTotemDuration

```lua
duration = GetTotemDuration(slot)
```

Arguments:
- `slot`: luaIndex

Returns:
- `duration`: LuaDurationObject

### GetTotemInfo

```lua
haveTotem, totemName, startTime, duration, icon, modRate, spellID = GetTotemInfo(slot)
```

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `slot`: luaIndex

Returns:
- `haveTotem`: bool
- `totemName`: cstring
- `startTime`: number
- `duration`: number
- `icon`: fileID
- `modRate`: number
- `spellID`: number

### GetTotemTimeLeft

```lua
timeLeft = GetTotemTimeLeft(slot)
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `slot`: luaIndex

Returns:
- `timeLeft`: number, may be nil

### TargetTotem

```lua
TargetTotem(slot)
```

Arguments:
- `slot`: luaIndex

## Tables

### TotemInfoScript (structure)

- `haveTotem`: bool
- `totemName`: cstring
- `startTime`: number
- `duration`: number
- `icon`: fileID
- `modRate`: number
- `spellID`: number

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
