$sourceData){ foreach($sourceData['rx_cogs'] as $cogId => $cog){ $cog['id'] = $cogId; $cog['source'] = explode('@', $source, 2)[0]; $cog['source_name'] = $sourceData['name']; $cog['rx_category'] = $sourceData['rx_category']; $cog['rx_branch'] = $sourceData['rx_branch']; if($cog['min_bot_version'] == '0.0.0'){ $cog['min_bot_version'] = ''; } if($cog['max_bot_version'] == '0.0.0'){ $cog['max_bot_version'] = ''; } if($cog['min_bot_version'] === $cog['max_bot_version']){ if(!empty($cog['max_bot_version'])){ array_unshift($cog['requirements'], 'Bot==' . $cog['max_bot_version']); } else if(!empty($cog['max_bot_version'])){ array_unshift($cog['requirements'], 'Bot==' . $cog['max_bot_version']); } } else { if(!empty($cog['max_bot_version'])){ array_unshift($cog['requirements'], 'Bot<=' . $cog['max_bot_version']); } if(!empty($cog['min_bot_version'])){ array_unshift($cog['requirements'], 'Bot>=' . $cog['min_bot_version']); } } if(!empty($cog['min_python_version'])){ array_unshift($cog['requirements'], 'Python>=' . implode('.', $cog['min_python_version'])); } if($cog['hidden'] || $cog['disabled']){ continue; } if($cog['rx_category'] == 'unapproved' && $show_ua !== "1"){ continue; } if(count($cog['author']) == 0){ continue; } # ghost entries foreach($cog['tags'] as $index => $this_tag){$cog['tags'][$index] = strtolower($this_tag);} if($filter && !in_array(strtolower($filter), $cog['tags'])){ continue; } if($search){ $matched = FALSE; if(stripos(strtolower($cog['id']), strtolower($search)) !== false){ $matched = TRUE; } else if(stripos(strtolower($cog['description'] ?: $cog['short']), strtolower($search)) !== false){ $matched = TRUE; } else if(in_array(strtolower($search), $cog['tags'])){ $matched = TRUE; } else { foreach($cog['author'] as $author) { if(stripos(strtolower($author), strtolower($search)) !== false){ $matched = TRUE; break; } } foreach($cog['requirements'] as $req) { if(stripos(strtolower($req), strtolower($search)) !== false){ $matched = TRUE; break; } } } if(!$matched){ continue; } } array_push($cogs, $cog); } } function byName($a,$b){ return ($a['id'] <= $b['id']) ? -1 : 1;} usort($cogs, "byName"); $cog_chunks = array_chunk($cogs, $per_page); ?> Red Discord Bot - Cog Index
The content of unapproved repositories has not been vetted by QA
Safety is not guaranteed. Use at your own risk
href="?filter=&ua=0"show-model="uadisclaim"> Include Unapproved
Warning: Use at your own risk! Unapproved repositories are provided by the community and have not yet been inspected for security or tested for stability. The Cog-Creators organization and Red's contributors are not responsible for any damage caused by 3rd party cogs.
There are no cogs on this page.
@ 0) { ?> Required Permissions 0) { ?> Bot Version and Packages Used', $cog['requirements']));?> Installation commandsrepo add cog install View Repository
Fork me on GitHub